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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 4c115b2..f9fbc36 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -2,11 +2,6 @@
#define RUST_AST_BASE_H
// Base for AST used in gccrs, basically required by all specific ast things
-// GCC imports
-#include "config.h"
-#include "system.h"
-#include "coretypes.h" // order: config, system, coretypes
-
#include "rust-system.h"
// STL imports
@@ -847,6 +842,9 @@ public:
* methods. */
virtual Location get_locus_slow () const { return Location (); }
+ // HACK: strictly not needed, but faster than full downcast clone
+ virtual bool is_expr_without_block () const = 0;
+
virtual void accept_vis (ASTVisitor &vis) = 0;
protected:
@@ -887,6 +885,8 @@ protected:
return clone_expr_without_block_impl ();
}
+ bool is_expr_without_block () const final override { return true; };
+
public:
// Unique pointer custom clone function
std::unique_ptr<ExprWithoutBlock> clone_expr_without_block () const