From c5dc4b0a5f4773c05ca4e8845df9b5cdeb978fc6 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Fri, 8 Sep 2023 11:23:51 +0200 Subject: [PATCH] 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 c4bb8177b68c..acfb360c3499 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; -- 2.47.2