From d1e2f3dfbb643e45b2f6ad10fda231533b306417 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Fri, 8 Sep 2023 11:23:51 +0200 Subject: [PATCH] gccrs: Add getters for proc macro mappings Add three different getters, one for each proc macro type. gcc/rust/ChangeLog: * backend/rust-compile-context.h: Add getters. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/backend/rust-compile-context.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 79e3457f110..36a36e79f68 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -376,6 +376,16 @@ public: custom_derive_macros.push_back (macro); } + const std::vector &get_bang_proc_macros () const { return bang_macros; } + const std::vector &get_attribute_proc_macros () const + { + return attribute_macros; + } + const std::vector &get_derive_proc_macros () const + { + return custom_derive_macros; + } + private: Resolver::Resolver *resolver; Resolver::TypeCheckContext *tyctx;