public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7832] gccrs: Remove NodeId member from Identifier
@ 2024-01-16 18:02 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6050e07157ef915460a936452f29bd237f795e5f

commit r14-7832-g6050e07157ef915460a936452f29bd237f795e5f
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Thu Jul 13 14:50:38 2023 +0200

    gccrs: Remove NodeId member from Identifier
    
    Remove the NodeId member from identifiers. This member did not make
    sense and was solely used for procedural macros.
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast.h: Remove NodeId from identifiers.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/ast/rust-ast.h | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 3f154ef4362..7c2e1224a23 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -36,20 +36,14 @@ class Identifier
 {
 public:
   // Create dummy identifier
-  Identifier ()
-    : ident (""), node_id (Analysis::Mappings::get ()->get_next_node_id ()),
-      loc (UNDEF_LOCATION)
-  {}
+  Identifier () : ident (""), loc (UNDEF_LOCATION) {}
   // Create identifier with dummy location
   Identifier (std::string ident, location_t loc = UNDEF_LOCATION)
-    : ident (ident), node_id (Analysis::Mappings::get ()->get_next_node_id ()),
-      loc (loc)
+    : ident (ident), loc (loc)
   {}
   // Create identifier from token
   Identifier (const_TokenPtr token)
-    : ident (token->get_str ()),
-      node_id (Analysis::Mappings::get ()->get_next_node_id ()),
-      loc (token->get_locus ())
+    : ident (token->get_str ()), loc (token->get_locus ())
   {}
 
   Identifier (const Identifier &) = default;
@@ -57,7 +51,6 @@ public:
   Identifier &operator= (const Identifier &) = default;
   Identifier &operator= (Identifier &&) = default;
 
-  NodeId get_node_id () const { return node_id; }
   location_t get_locus () const { return loc; }
   const std::string &as_string () const { return ident; }
 
@@ -65,7 +58,6 @@ public:
 
 private:
   std::string ident;
-  NodeId node_id;
   location_t loc;
 };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:02 [gcc r14-7832] gccrs: Remove NodeId member from Identifier Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).