* [PATCH] Remove HIR MacroItem and other hir macro forward declarations
@ 2021-07-11 21:39 Mark Wielaard
2021-07-12 8:12 ` Philip Herron
0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2021-07-11 21:39 UTC (permalink / raw)
To: gcc-rust; +Cc: Mark Wielaard
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove HIR MacroItem and other hir macro forward declarations
2021-07-11 21:39 [PATCH] Remove HIR MacroItem and other hir macro forward declarations Mark Wielaard
@ 2021-07-12 8:12 ` Philip Herron
0 siblings, 0 replies; 2+ messages in thread
From: Philip Herron @ 2021-07-12 8:12 UTC (permalink / raw)
To: gcc-rust
[-- Attachment #1.1: Type: text/plain, Size: 3302 bytes --]
On 11/07/2021 22:39, Mark Wielaard wrote:
> 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
> {
Hi Mark,
Thanks for this, I missed these tree's in my last cleanup. This is
currently being merged: https://github.com/Rust-GCC/gccrs/pull/560
Thanks
--Phil
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-12 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11 21:39 [PATCH] Remove HIR MacroItem and other hir macro forward declarations Mark Wielaard
2021-07-12 8:12 ` Philip Herron
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).