aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.h
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2022-01-15 22:43:08 +0100
committerMarc Poulhiès <dkm@kataplop.net>2022-02-25 20:37:37 +0100
commitdffb1adabd3853a8d1100e53d5fa351f8b5f180c (patch)
tree1daec8a8d99f4936805928920132a2b4be794c88 /gcc/rust/backend/rust-compile-base.h
parentb695eb8f0bae01e00dfb9e9bf2554d1b48b76a9a (diff)
downloadgcc-dffb1adabd3853a8d1100e53d5fa351f8b5f180c.zip
gcc-dffb1adabd3853a8d1100e53d5fa351f8b5f180c.tar.gz
gcc-dffb1adabd3853a8d1100e53d5fa351f8b5f180c.tar.bz2
HIR Visitor refactoring
This change split the single HIR visitor in smaller abstract ones: - Stmt - VisItem - Pattern - ExternalItem - Impl - Type - Expression Instead of providing a Base class with empty visit() methods, they are kept abstract to avoid the case where a missing visit() is silently ignored: implementors must explicitely override all visit. There is also a FullVisitor that covers all HIR nodes and also provides a Base class with empty behavior. fixes #825 Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.h')
-rw-r--r--gcc/rust/backend/rust-compile-base.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index 5d27f7b..b434168 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -1,3 +1,5 @@
+// Copyright (C) 2020-2022 Free Software Foundation, Inc.
+
// This file is part of GCC.
// GCC is free software; you can redistribute it and/or modify it under
@@ -25,7 +27,7 @@
namespace Rust {
namespace Compile {
-class HIRCompileBase : public HIR::HIRFullVisitorBase
+class HIRCompileBase
{
public:
virtual ~HIRCompileBase () {}