]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Make expand visitor inherit from default visitor
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 27 Nov 2023 13:12:20 +0000 (14:12 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:49 +0000 (12:36 +0100)
commit65fb288e0dacee46ba0d981e00e151064e2d4162
tree3e813eab058d341ea5643da92038a23c69a6aab6
parentb3b5115533c44f6f9206a702586ac9b3fe6750cb
gccrs: Make expand visitor inherit from default visitor

Many visit functions in the expand visitor simply visit their components
like the default visitor. Making the expand visitor inherit from the
default visitor allows us to keep all visitor in sync without having to
change every visitor.

gcc/rust/ChangeLog:

* expand/rust-expand-visitor.cc (ExpandVisitor::go): Add call to visit
on the crate.
(ExpandVisitor::visit): Remove some visit functions in favor of their
default visitor counterpart.
* expand/rust-expand-visitor.h (class ExpandVisitor): Inherit from
default visitor and remove now useless function prototypes.

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