From: Pierre-Emmanuel Patry Date: Mon, 15 May 2023 13:13:38 +0000 (+0200) Subject: gccrs: libproc_macro: Add procmacro array definition X-Git-Tag: basepoints/gcc-15~2488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ca2f2030048e0a0121a32ad218c0e3f7a327191;p=thirdparty%2Fgcc.git gccrs: 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. libgrust/ChangeLog: * libproc_macro/proc_macro.h (struct ProcmacroArray): Add ProcmacroArray definition. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/libgrust/libproc_macro/proc_macro.h b/libgrust/libproc_macro/proc_macro.h index 3022203a5dd5..dcd2e6926c6b 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 */