From 2504357146d5f9e5b9b87aa9cf79dd4f14e9fcd5 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 29 Aug 2023 16:41:55 +0200 Subject: gccrs: Change proc macro mapping definition insertion Since the node id already is contained into the proc macro we may omit it from the function arguments. gcc/rust/ChangeLog: * util/rust-hir-map.cc (Mappings::insert_derive_proc_macro_def): Change the function body to fetch the node id from the macro parameter. (Mappings::insert_bang_proc_macro_def): Likewise. (Mappings::insert_attribute_proc_macro_def): Likewise. * util/rust-hir-map.h: Update the function's prototype by removing the node id from the list of arguments. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/util/rust-hir-map.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/rust/util/rust-hir-map.h') diff --git a/gcc/rust/util/rust-hir-map.h b/gcc/rust/util/rust-hir-map.h index 85da280..a663bfe 100644 --- a/gcc/rust/util/rust-hir-map.h +++ b/gcc/rust/util/rust-hir-map.h @@ -302,9 +302,9 @@ public: tl::optional &> lookup_attribute_proc_macros (CrateNum num); - void insert_derive_proc_macro_def (NodeId id, CustomDeriveProcMacro macro); - void insert_bang_proc_macro_def (NodeId id, BangProcMacro macro); - void insert_attribute_proc_macro_def (NodeId id, AttributeProcMacro macro); + void insert_derive_proc_macro_def (CustomDeriveProcMacro macro); + void insert_bang_proc_macro_def (BangProcMacro macro); + void insert_attribute_proc_macro_def (AttributeProcMacro macro); tl::optional lookup_derive_proc_macro_def (NodeId id); -- cgit v1.1