Skip to content

Improve LifetimeDependenceDefUseWalker: consult DestructorAnalysis. #81551

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

atrick
Copy link
Contributor

@atrick atrick commented May 16, 2025

  • Fix DestructorAnalysis: handle enum, FixedArray, and generic types.
    This checks the members of a value type to determine whether its synthesized
    deinitializer can have side effects.

    Add support for enum and fixed array.

    Add support for generic types. The old code was inexplicably failing to apply
    the aggregate's type substitutions to the members.

  • SwiftCompilerSources: bridge DestructorAnalysis.

  • Add DestructorAnalysis to LifetimeDependenceDefUseWalker.

  • [NFC] LifetimeDependence: fix internal debug output

  • Improve LifetimeDependenceDefUseWalker: consult DestructorAnalysis.
    Fixes rdar://150828355 (Overlapping access error after the last use
    of a lifetime-dependent span variable)

atrick added 5 commits May 15, 2025 23:45
This checks the members of a value type to determine whether its synthesized
deinitializer can have side effects.

Add support for enum and fixed array.

Add support for generic types. The old code was inexplicably failing to apply
the aggregate's type substitutions to the members.
Fixes rdar://150828355 (Overlapping access error after the last use
of a lifetime-dependent span variable)
@atrick atrick requested a review from eeckstein as a code owner May 16, 2025 07:13
@atrick atrick marked this pull request as draft May 16, 2025 07:14
@atrick
Copy link
Contributor Author

atrick commented May 16, 2025

@slavapestov since this will be a late change to 6.2, could you check that this use of substitution maps makes sense?
8304db5

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.

1 participant