Skip to content

[lldb] Retire the Swift-specific scratch context accessors #9615

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

Conversation

adrian-prantl
Copy link

@adrian-prantl adrian-prantl commented Nov 16, 2024

These used to be necessary because there used to be context-specific
scratch contexts, however, now there is only one global
TypeSystemSwiftTypeRefForExpressions, and it manages multiple
SwiftASTContexts. Therefore it is no longer necessary to have
Swift-specific hooks in Target and ValueObject.

depends on #9613

Now that all scratch contexts are using precise per-CU compiler
invocations, the infrastructure for the per-module fallback scratch
context is no longer needed, since it is actually less precise than
the "normal" contexts. This patch removes the notion of a fallback
SwiftASTContext entirely.
This mechanism was put into place to deal with SwiftASTContexts being
torn down and replaced. While that may still happen, we no have a much
better solution for the problem of dangling type references:
CompilerType now holds a weak_ptr to the type system so it's safe to
destroy a type system.
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl force-pushed the retire-createswiftscratchcontext branch 2 times, most recently from 97a0f57 to deb7ae9 Compare November 18, 2024 21:48
@adrian-prantl
Copy link
Author

@swift-ci test

These used to be necessary because there used to be context-specific
scratch contexts, however, now there is only one global
TypeSystemSwiftTypeRefForExpressions, and it manages multiple
SwiftASTContexts. Therefore it is no longer necessary to have
Swift-specific hooks in Target and ValueObject.
@adrian-prantl adrian-prantl force-pushed the retire-createswiftscratchcontext branch from deb7ae9 to 927f129 Compare November 18, 2024 22:26
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 698b909 into swiftlang:stable/20240723 Nov 19, 2024
2 of 3 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.

1 participant