[gcc r14-7885] gccrs: resolver: Resolve macros too.

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:04:24 GMT 2024


https://gcc.gnu.org/g:d3d006d6b08710c42ccede8a041f6a8366a75ffa

commit r14-7885-gd3d006d6b08710c42ccede8a041f6a8366a75ffa
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date:   Sun Jul 23 03:19:46 2023 +0200

    gccrs: resolver: Resolve macros too.
    
    gcc/rust/ChangeLog:
    
            * resolve/rust-name-resolution-context.cc
            (Resolver::insert): Do not call into `rust_unreachable` when resolving
            macros anymore.

Diff:
---
 gcc/rust/resolve/rust-name-resolution-context.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/rust/resolve/rust-name-resolution-context.cc b/gcc/rust/resolve/rust-name-resolution-context.cc
index 98efdccda56..82771cdd923 100644
--- a/gcc/rust/resolve/rust-name-resolution-context.cc
+++ b/gcc/rust/resolve/rust-name-resolution-context.cc
@@ -30,9 +30,11 @@ NameResolutionContext::insert (Identifier name, NodeId id, Namespace ns)
       return values.insert (name, id);
     case Namespace::Types:
       return types.insert (name, id);
-    case Namespace::Labels:
     case Namespace::Macros:
+      return macros.insert (name, id);
+    case Namespace::Labels:
     default:
+      // return labels.insert (name, id);
       rust_unreachable ();
     }
 }


More information about the Gcc-cvs mailing list