diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-03-21 17:37:47 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:28:38 +0100 |
commit | 79d56acad2eea8af518b28051d28c0996db5874d (patch) | |
tree | 4c1a4a6204a05be83cbd4f1986661bb0da72ab4a /gcc/rust/rust-session-manager.cc | |
parent | d85089ea28c99eabbee89fd434bea748d1623427 (diff) | |
download | gcc-79d56acad2eea8af518b28051d28c0996db5874d.zip gcc-79d56acad2eea8af518b28051d28c0996db5874d.tar.gz gcc-79d56acad2eea8af518b28051d28c0996db5874d.tar.bz2 |
gccrs: 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 2388964..e52d6f2 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); |