aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2025-01-10 23:55:29 -0500
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-21 12:56:57 +0100
commitc9f85323b5173fef754ccc5698e36aef8cee17aa (patch)
tree4ecba6f2535a7421cdba557c2279a487646b6adb
parentc0681b527a0142c59cd737e1d140bdaf2a782f3d (diff)
downloadgcc-c9f85323b5173fef754ccc5698e36aef8cee17aa.zip
gcc-c9f85323b5173fef754ccc5698e36aef8cee17aa.tar.gz
gcc-c9f85323b5173fef754ccc5698e36aef8cee17aa.tar.bz2
gccrs: nr2.0: Early resolve pending eager macro invocations
gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::visit): Resolve the pending eager invocations inside builtin macro invocations. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
-rw-r--r--gcc/rust/resolve/rust-early-name-resolver-2.0.cc4
-rw-r--r--gcc/testsuite/rust/compile/nr2/exclude5
2 files changed, 4 insertions, 5 deletions
diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
index 5533048..342f102 100644
--- a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
@@ -238,6 +238,10 @@ Early::visit (AST::MacroInvocation &invoc)
{
auto path = invoc.get_invoc_data ().get_path ();
+ if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin)
+ for (auto &pending_invoc : invoc.get_pending_eager_invocations ())
+ pending_invoc->accept_vis (*this);
+
// When a macro is invoked by an unqualified identifier (not part of a
// multi-part path), it is first looked up in textual scoping. If this does
// not yield any results, then it is looked up in path-based scoping. If the
diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude
index 9b490c1..0f482df 100644
--- a/gcc/testsuite/rust/compile/nr2/exclude
+++ b/gcc/testsuite/rust/compile/nr2/exclude
@@ -1,11 +1,6 @@
bounds1.rs
break-rust2.rs
break-rust3.rs
-macros/builtin/eager1.rs
-macros/builtin/eager2.rs
-macros/builtin/recurse2.rs
-macros/builtin/include3.rs
-macros/builtin/include4.rs
canonical_paths1.rs
cfg1.rs
cfg3.rs