]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Change cfg stripper to use default visitor
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 23 Nov 2023 19:22:29 +0000 (20:22 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:49 +0000 (12:36 +0100)
commit5ee51aa3e5a76f55889e47ca874e1010a3a878d7
tree58ea8428fd0d6982dad636558eadfa743f3dcb7e
parent65fb288e0dacee46ba0d981e00e151064e2d4162
gccrs: Change cfg stripper to use default visitor

Cfg visitor used it's own visit patterns, this made the code longer than
required.

gcc/rust/ChangeLog:

* expand/rust-cfg-strip.cc (CfgStrip::visit): Change calls from visitor
to default visitor.
(CfgStrip::go): Add call to visit crate.
* expand/rust-cfg-strip.h (class CfgStrip): Update prototypes and
remove empty ones.
* ast/rust-ast-visitor.cc: add WhereClause condition check.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-visitor.cc
gcc/rust/expand/rust-cfg-strip.cc
gcc/rust/expand/rust-cfg-strip.h