aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-05-15 15:13:38 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2023-06-08 14:32:34 +0200
commiteace2796ddcd1465087400ced4736e8be630cbe9 (patch)
treed9644bc5171fe97bfd6da4d37e4c34b3a8671c1f
parentb966194fa3159d740d0cdaae5bb48400147037fe (diff)
downloadgcc-eace2796ddcd1465087400ced4736e8be630cbe9.zip
gcc-eace2796ddcd1465087400ced4736e8be630cbe9.tar.gz
gcc-eace2796ddcd1465087400ced4736e8be630cbe9.tar.bz2
libproc_macro: Add procmacro array definition
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. ChangeLog: * libgrust/libproc_macro/proc_macro.h (struct ProcmacroArray): Add ProcmacroArray definition. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r--libgrust/libproc_macro/proc_macro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgrust/libproc_macro/proc_macro.h b/libgrust/libproc_macro/proc_macro.h
index 3022203..dcd2e69 100644
--- a/libgrust/libproc_macro/proc_macro.h
+++ b/libgrust/libproc_macro/proc_macro.h
@@ -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 */