aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-09-06 14:44:20 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-10-31 11:39:08 +0000
commit573ca06d2a88c4cc27598c2f8597d8316f3fa418 (patch)
tree9a92b881fd6e947ca90b387ec9d911ddeb4a4199 /gcc/rust/hir
parent80fe1c7b6f5a253655f7b5a8849b7d3c746cecf4 (diff)
downloadgcc-573ca06d2a88c4cc27598c2f8597d8316f3fa418.zip
gcc-573ca06d2a88c4cc27598c2f8597d8316f3fa418.tar.gz
gcc-573ca06d2a88c4cc27598c2f8597d8316f3fa418.tar.bz2
Collect procedural macros in the crate
Collect informations on procedural macros in the compiled crate. For attribute and bang procedural macros we only require the final address as well as the name of the function. Derive procedural macros are a bit different, we collect the fonction's address through it's fndecl tree as well as the trait's name and the multiple attributes. gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl): Make the function non static in order to be able to access the compile context. Also add the whole proc macro infomrmation collection. (get_attributes): Add a function to retrieve the different attributes from a derive procedural macro definition attribute. (get_trait_name): Add a function to retrieve the trait name from a derive procedural macro definition attribute. * backend/rust-compile-base.h: Add function prototypes. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/hir')
0 files changed, 0 insertions, 0 deletions