]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: libproc_macro: Add procmacro array definition
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 15 May 2023 13:13:38 +0000 (15:13 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:46:25 +0000 (18:46 +0100)
Standard types do not guarantee anything about their ABI and are
therefore unconvenient to use as a primarily exposed container.
With such asumption this commit introduces a container.

libgrust/ChangeLog:

* libproc_macro/proc_macro.h (struct ProcmacroArray):
Add ProcmacroArray definition.

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

index 3022203a5dd59628724312d625d351f1136ea3ae..dcd2e6926c6b4b7e0476eff3e7ab7aec81c15f48 100644 (file)
@@ -89,6 +89,12 @@ public:
   Procmacro make_bang (const char *name, BangMacro macro);
 };
 
+struct ProcmacroArray
+{
+  std::uint64_t length;
+  Procmacro *macros;
+};
+
 } // namespace ProcMacro
 
 #endif /* ! PROC_MACRO_H */