Skip to content

Commit

Permalink
Add getters for proc macro mappings
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
P-E-P committed Sep 11, 2023
1 parent 51c8101 commit 8a4ffc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gcc/rust/backend/rust-compile-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,16 @@ class Context
custom_derive_macros.push_back (macro);
}

const std::vector<tree> &get_bang_proc_macros () const { return bang_macros; }
const std::vector<tree> &get_attribute_proc_macros () const
{
return attribute_macros;
}
const std::vector<CustomDeriveInfo> &get_derive_proc_macros () const
{
return custom_derive_macros;
}

private:
Resolver::Resolver *resolver;
Resolver::TypeCheckContext *tyctx;
Expand Down

0 comments on commit 8a4ffc7

Please sign in to comment.