public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Philip Herron <philip.herron@embecosm.com>
To: gcc-rust@gcc.gnu.org
Subject: Re: [PATCH] Remove HIR MacroItem and other hir macro forward declarations
Date: Mon, 12 Jul 2021 09:12:48 +0100	[thread overview]
Message-ID: <42c51794-7c28-4468-20e3-1f951897d2df@embecosm.com> (raw)
In-Reply-To: <20210711213912.398458-1-mark@klomp.org>


[-- 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 --]

      reply	other threads:[~2021-07-12  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 21:39 Mark Wielaard
2021-07-12  8:12 ` Philip Herron [this message]

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=42c51794-7c28-4468-20e3-1f951897d2df@embecosm.com \
    --to=philip.herron@embecosm.com \
    --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).