aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-ast.h')
-rw-r--r--gcc/rust/ast/rust-ast.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 95e4738..72f2609 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -822,6 +822,8 @@ public:
virtual bool is_marked_for_strip () const = 0;
NodeId get_node_id () const { return node_id; }
+ virtual bool is_item () const = 0;
+
protected:
Stmt () : node_id (Analysis::Mappings::get ()->get_next_node_id ()) {}
@@ -847,6 +849,8 @@ public:
add_crate_name (std::vector<std::string> &names ATTRIBUTE_UNUSED) const
{}
+ bool is_item () const override final { return true; }
+
protected:
// Clone function implementation as pure virtual method
virtual Item *clone_item_impl () const = 0;