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

Fix functions not being kept for debugger #73678

Merged
merged 2 commits into from
May 23, 2024

Conversation

augusto2112
Copy link
Contributor

Explanation: At Onone, many types of functions (anything user written, compiler generated setters and getters, etc), should be kept in the final binary so they're accessible by the debugger. They were previously being optimized out.
Scope: changes which functions should be kept for the debugger or not.
Risk: Low, affects whether a function should be optimized out or not, but not the actual logic of IRGening functions.
Testing: Added a compiler test. Modified a few tests to match the current expected behavior.
Issue: rdar://126763340
Reviewer: @adrian-prantl @al45tair @eeckstein

@augusto2112 augusto2112 requested a review from a team as a code owner May 16, 2024 18:41
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112
Copy link
Contributor Author

apple/llvm-project#8740
@swift-ci test

@adrian-prantl
Copy link
Member

@swift-ci test windows

At Onone, many types of functions (anything user written, compiler
generated setters and getters, etc), should be kept in the final
binary so they're accessible by the debugger.

rdar://126763340
(cherry picked from commit 5298450)
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.

(cherry picked from commit 4aec4e7)
@augusto2112
Copy link
Contributor Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit f0d5b4c into apple:release/6.0 May 23, 2024
5 checks passed
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

3 participants