Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make expand visitor inherit from default visitor #2761

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Nov 27, 2023

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.

@P-E-P P-E-P added this to the GCC 14.1 release milestone Nov 27, 2023
@P-E-P P-E-P requested a review from CohenArthur November 27, 2023 13:16
@P-E-P P-E-P self-assigned this Nov 27, 2023
@P-E-P P-E-P marked this pull request as ready for review November 27, 2023 13:29
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 <[email protected]>
@P-E-P P-E-P force-pushed the expand-visitor-default-visitor branch from 25c27b0 to 9990873 Compare November 27, 2023 15:02
@P-E-P P-E-P added cleanup and removed enhancement labels Nov 27, 2023
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@P-E-P P-E-P added this pull request to the merge queue Dec 11, 2023
Merged via the queue into Rust-GCC:master with commit 61d4955 Dec 11, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants