diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-03-21 17:37:47 +0100 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-03-25 08:47:56 +0000 |
commit | 3eb5dcb67c40a2d26fe05442d1d64dcb3b9d1d09 (patch) | |
tree | 1ded79f30c1bf60f3e149e8be9095512e8abe33e /gcc/rust/rust-session-manager.cc | |
parent | 267d80f146da679e44aa377f889d717032102268 (diff) | |
download | gcc-3eb5dcb67c40a2d26fe05442d1d64dcb3b9d1d09.zip gcc-3eb5dcb67c40a2d26fe05442d1d64dcb3b9d1d09.tar.gz gcc-3eb5dcb67c40a2d26fe05442d1d64dcb3b9d1d09.tar.bz2 |
expand: Rename AttrVisitor -> CfgStrip
Since the expansion and stripping phase are now separated, it does not
make sense to keep AttrVisitor named AttrVisitor. Furthermore, the visitor
is already very complex, with a heavy mental load (erasing iterators,
rearranging them, performing cfg-expansion, etc) so further attribute
handling should probably happen in rust-attribute-checker.h
gcc/rust/ChangeLog:
* Make-lang.in: Rename rust-asttribute-visitor.o -> rust-cfg-strip.o
* expand/rust-attribute-visitor.cc: Moved to...
* expand/rust-cfg-strip.cc: ...here.
* expand/rust-attribute-visitor.h: Moved to...
* expand/rust-cfg-strip.h: ...here.
* expand/rust-macro-expand.cc: Fix include of rust-attribute-visitor.h
* expand/rust-macro-builtins.cc: Likewise.
* rust-session-manager.cc (Session::expansion): Call CfgStrip instead of
AttrVisitor.
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r-- | gcc/rust/rust-session-manager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 66863f4..b8fa0c0 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -40,7 +40,7 @@ #include "rust-extern-crate.h" #include "rust-attributes.h" #include "rust-early-name-resolver.h" -#include "rust-attribute-visitor.h" +#include "rust-cfg-strip.h" #include "rust-expand-visitor.h" #include "diagnostic.h" @@ -848,7 +848,7 @@ Session::expansion (AST::Crate &crate) while (!fixed_point_reached && iterations < cfg.recursion_limit) { - AttrVisitor ().go (crate); + CfgStrip ().go (crate); Resolver::EarlyNameResolver ().go (crate); ExpandVisitor (expander).go (crate); |