]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: libproc_macro: Put literal members in namespace
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 7 Apr 2023 13:02:55 +0000 (15:02 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:10 +0000 (18:34 +0100)
Add a Literal namespace to gather all every literal related code.

libgrust/ChangeLog:

* libproc_macro/literal.cc (Literal__from_string):
Add abort because unimplemented.
* libproc_macro/literal.h (Literal__from_string): Add
namespace.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
libgrust/libproc_macro/literal.cc
libgrust/libproc_macro/literal.h

index a667fcb72fe2a9b39e17435a0b4548e3f69af49a..57709d59b3745c2032cec9dbb52d099372d284d1 100644 (file)
@@ -22,6 +22,9 @@
 
 #include "literal.h"
 #include <cstring>
+#include <cstdlib>
+
+namespace Literal {
 
 extern "C" {
 
@@ -75,6 +78,8 @@ bool
 Literal__from_string (const unsigned char *str, std::uint64_t len, Literal *lit)
 {
   // FIXME: implement this function with parser
+  std::abort ();
   return false;
 }
 }
+} // namespace Literal
index 62a14522d1dbfaf9e6fa2252ffbfd47282d1e0b0..6ae707b5b5ef2bbd58c40b730e9297bcb6930d08 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <cstdint>
 
+namespace Literal {
 enum UnsignedTag
 {
   UNSIGNED_8,
@@ -172,5 +173,6 @@ bool
 Literal__from_string (const unsigned char *str, std::uint64_t len,
                      Literal *lit);
 }
+} // namespace Literal
 
 #endif /* ! LITERAL_H */