diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-resolve-path.h | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.h b/gcc/rust/backend/rust-compile-resolve-path.h index 12cdc19..79bfb86 100644 --- a/gcc/rust/backend/rust-compile-resolve-path.h +++ b/gcc/rust/backend/rust-compile-resolve-path.h @@ -20,46 +20,18 @@ #define RUST_COMPILE_RESOLVE_PATH #include "rust-compile-base.h" -#include "rust-hir-visitor.h" namespace Rust { namespace Compile { -class ResolvePathRef : public HIRCompileBase, public HIR::HIRPatternVisitor +class ResolvePathRef : public HIRCompileBase { public: - static tree Compile (HIR::QualifiedPathInExpression &expr, Context *ctx) - { - ResolvePathRef resolver (ctx); - expr.accept_vis (resolver); - return resolver.resolved; - } + static tree Compile (HIR::QualifiedPathInExpression &expr, Context *ctx); - static tree Compile (HIR::PathInExpression &expr, Context *ctx) - { - ResolvePathRef resolver (ctx); - expr.accept_vis (resolver); - return resolver.resolved; - } + static tree Compile (HIR::PathInExpression &expr, Context *ctx); - void visit (HIR::PathInExpression &expr) override; - void visit (HIR::QualifiedPathInExpression &expr) override; - - // Empty visit for unused Pattern HIR nodes. - void visit (HIR::IdentifierPattern &) override {} - void visit (HIR::LiteralPattern &) override {} - void visit (HIR::RangePattern &) override {} - void visit (HIR::ReferencePattern &) override {} - void visit (HIR::SlicePattern &) override {} - void visit (HIR::AltPattern &) override {} - void visit (HIR::StructPattern &) override {} - void visit (HIR::TuplePattern &) override {} - void visit (HIR::TupleStructPattern &) override {} - void visit (HIR::WildcardPattern &) override {} - - ResolvePathRef (Context *ctx) - : HIRCompileBase (ctx), resolved (error_mark_node) - {} + ResolvePathRef (Context *ctx); /** * Generic visitor for both PathInExpression and QualifiedPathInExpression @@ -81,8 +53,6 @@ public: const Analysis::NodeMapping &mappings, location_t locus, bool is_qualified_path); - tree resolved; - private: tree attempt_constructor_expression_lookup (TyTy::BaseType *lookup, Context *ctx, |