aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-07-13 14:50:38 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-07-27 09:39:23 +0000
commit18837b84b58b81fb749ce1e7f8a59bf19787fbd8 (patch)
tree346322c3b179f1243e556b361b8b08a39aa23b94 /gcc/rust
parent7cfba279dad9cf5e193b29cb34691156ee3fb221 (diff)
downloadgcc-18837b84b58b81fb749ce1e7f8a59bf19787fbd8.zip
gcc-18837b84b58b81fb749ce1e7f8a59bf19787fbd8.tar.gz
gcc-18837b84b58b81fb749ce1e7f8a59bf19787fbd8.tar.bz2
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>
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/ast/rust-ast.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 30b5d94..22ac0ae 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;
};