aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-06-27 14:03:16 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-06-29 09:26:34 +0000
commit09512e613540ca1b8162030b6b4dd381c36e79eb (patch)
treed81b8c8548eef10142f91eda987429f65f53cf3b /gcc
parentd5723ccebbf62ed4546c5e2b2141b274585dd64c (diff)
downloadgcc-09512e613540ca1b8162030b6b4dd381c36e79eb.zip
gcc-09512e613540ca1b8162030b6b4dd381c36e79eb.tar.gz
gcc-09512e613540ca1b8162030b6b4dd381c36e79eb.tar.bz2
ast: Add explicit default copy constructor
Add explicit default copy/move constructor to identifiers. gcc/rust/ChangeLog: * ast/rust-ast.h: Add default constructors. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 98b0482..4eaa39d 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -39,6 +39,11 @@ public:
: ident (ident), node_id (Analysis::Mappings::get ()->get_next_node_id ())
{}
+ Identifier (const Identifier &) = default;
+ Identifier (Identifier &&) = default;
+ Identifier &operator= (const Identifier &) = default;
+ Identifier &operator= (Identifier &&) = default;
+
NodeId get_node_id () const { return node_id; }
const std::string &as_string () const { return ident; }