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

RemoveUnusedDeclarations - make helpers protected #4668

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

ChrisDodd
Copy link
Contributor

No description provided.

Copy link
Contributor

@vlstill vlstill left a comment

Choose a reason for hiding this comment

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

What is the use case? I am little surprised the descendand class does not need to override any of these helpers.

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label May 20, 2024
@ChrisDodd
Copy link
Contributor Author

What is the use case? I am little surprised the descendand class does not need to override any of these helpers.

The general use-case is to have a subclass override some preorder method(s) for subclasses of IR::Declaration to not always call process for the declaration -- check some thing about the declaration (perhaps an annotation or something) and only conditionally call process. While this can also be done (effectively) by calling the base class preorder method, calling process directly seems cleaner.

@ChrisDodd ChrisDodd added this pull request to the merge queue May 20, 2024
Merged via the queue into main with commit ded29bd May 20, 2024
17 checks passed
@ChrisDodd ChrisDodd deleted the cdodd-misc branch May 20, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants