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

Remove dependency of SILFunction in IRGenOptions #73727

Merged
merged 1 commit into from
May 22, 2024

Conversation

augusto2112
Copy link
Contributor

SILFunction::shouldBePreservedForDebugger checks if some optimizations are enabled to decide whether a function should be preserved so its accessible form the debugger or not. Some of these settings used to live only in IRGenOptions making SILFunction depend on IRGenOptions. This patch duplicates those settings into SILOptions to remove that dependency.

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

options->LLVMLTOKind != IRGenLLVMLTOKind::None) {
return false;
}
const auto &silOptions = getModule().getOptions();
Copy link
Member

Choose a reason for hiding this comment

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

Why not just add a bool ShouldBePreservedByDebugger to SILOptions? Then you don’t have to much a bunch of stuff around.

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

SILFunction::shouldBePreservedForDebugger checks if some optimizations
are enabled to decide whether a function should be preserved so its
accessible form the debugger or not. Some of these settings used to live
only in IRGenOptions making SILFunction depend on IRGenOptions.
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112 augusto2112 merged commit 16755e9 into apple:main May 22, 2024
5 checks passed
Copy link
Member

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants