aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.h
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-09-20 17:39:16 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:09:33 +0100
commitc0a7f3e67a428affcd508eb272034fceb7f2841f (patch)
tree9522bf61764260647b38a1894907179b4be9b249 /gcc/rust/backend/rust-compile-base.h
parent10699fb34a2969102afe3519caae62dddb8075fc (diff)
downloadgcc-c0a7f3e67a428affcd508eb272034fceb7f2841f.zip
gcc-c0a7f3e67a428affcd508eb272034fceb7f2841f.tar.gz
gcc-c0a7f3e67a428affcd508eb272034fceb7f2841f.tar.bz2
gccrs: Add macro buffer global variable export
Export a new symbol containing the proc macros. gcc/rust/ChangeLog: * backend/rust-compile-base.h: Make static function address_expression public. * backend/rust-compile.cc (CompileCrate::add_proc_macro_symbols): Add new global variable in export function. (build_bang_proc_macro): Add a function to build the bang proc macro structure type. (build_proc_macro): Add a function to build the proc macro structure type. (build_proc_macro_payload): Add a function to build the proc macro union used in proc macro structures. (init_derive_proc_macro): Add a function to initialize custom derive proc macros. (init_attribute_proc_macro): Add a function to initialize attribute proc macros. (init_bang_proc_macro): Add a function to initialize bang proc macros. (init_proc_macro): Add a function to initialize proc macro structures. (initialize_proc_macro_array): Add a function to initialize the proc macro buffer array. (CompileCrate::add_proc_macro_symbols): Add call to the new functions to correctly initialize proc macros as well as their entrypoint. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.h')
-rw-r--r--gcc/rust/backend/rust-compile-base.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index 41907ec..6529123 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -29,6 +29,8 @@ class HIRCompileBase
public:
virtual ~HIRCompileBase () {}
+ static tree address_expression (tree expr, location_t locus);
+
protected:
HIRCompileBase (Context *ctx) : ctx (ctx) {}
@@ -139,8 +141,6 @@ protected:
static void setup_abi_options (tree fndecl, ABI abi);
- static tree address_expression (tree expr, location_t locus);
-
static tree indirect_expression (tree expr, location_t locus);
static bool mark_addressable (tree, location_t);