From: Mark Wielaard <mark@klomp.org>
To: gcc-rust@gcc.gnu.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] Remove HIR MacroItem and other hir macro forward declarations
Date: Sun, 11 Jul 2021 23:39:12 +0200 [thread overview]
Message-ID: <20210711213912.398458-1-mark@klomp.org> (raw)
Almost all HIR Macro related trees were already removed by
https://github.com/Rust-GCC/gccrs/pull/492
But there was still one MacroItem class left in rust-hir.h and several
(unused) forward declarations in various other hir .h files. Remove
them all.
Resolves: https://github.com/Rust-GCC/gccrs/issues/69
---
gcc/rust/hir/tree/rust-hir-expr.h | 3 ---
gcc/rust/hir/tree/rust-hir-item.h | 3 ---
gcc/rust/hir/tree/rust-hir-pattern.h | 2 --
gcc/rust/hir/tree/rust-hir-type.h | 3 ---
gcc/rust/hir/tree/rust-hir.h | 11 -----------
5 files changed, 22 deletions(-)
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h
index 681ccf8ad65..2b1e9380f6c 100644
--- a/gcc/rust/hir/tree/rust-hir-expr.h
+++ b/gcc/rust/hir/tree/rust-hir-expr.h
@@ -3094,9 +3094,6 @@ protected:
}
};
-// Forward decl - defined in rust-macro.h
-class MacroInvocation;
-
// An unsafe block HIR node
class UnsafeBlockExpr : public ExprWithBlock
{
diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index 10b1f6143f0..e7e110fda92 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -3020,9 +3020,6 @@ protected:
}*/
};
-// Replaced with forward decls - defined in "rust-macro.h"
-class MacroItem;
-class MacroRulesDefinition;
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h
index 27cba7d6e18..ac7155d562f 100644
--- a/gcc/rust/hir/tree/rust-hir-pattern.h
+++ b/gcc/rust/hir/tree/rust-hir-pattern.h
@@ -1152,8 +1152,6 @@ class PathPattern;
class PathInExpression;
class QualifiedPathInExpression;
-// Replaced with forward decl - defined in rust-macro.h
-class MacroInvocation;
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-type.h b/gcc/rust/hir/tree/rust-hir-type.h
index 42fccb59607..c4771b6db38 100644
--- a/gcc/rust/hir/tree/rust-hir-type.h
+++ b/gcc/rust/hir/tree/rust-hir-type.h
@@ -907,9 +907,6 @@ protected:
}
};
-// Forward decl - defined in rust-macro.h
-class MacroInvocation;
-
/* TODO: possible types
* struct type?
* "enum" (tagged union) type?
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index 1819d17b585..7d53feb0a4e 100644
--- a/gcc/rust/hir/tree/rust-hir.h
+++ b/gcc/rust/hir/tree/rust-hir.h
@@ -613,17 +613,6 @@ protected:
}
};
-// A macro item HIR node - potentially abstract base class
-class MacroItem : public Item
-{
- /*public:
- std::string as_string() const;*/
-protected:
- MacroItem (Analysis::NodeMapping mappings, AST::AttrVec outer_attribs)
- : Item (std::move (mappings), std::move (outer_attribs))
- {}
-};
-
// Item used in trait declarations - abstract base class
class TraitItem
{
--
2.32.0
next reply other threads:[~2021-07-11 21:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-11 21:39 Mark Wielaard [this message]
2021-07-12 8:12 ` Philip Herron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210711213912.398458-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=gcc-rust@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).