Skip to content

[DebugInfo] Always emit unsubstituted generic types with size 0 #73430

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

Merged
merged 1 commit into from
May 4, 2024

Conversation

augusto2112
Copy link
Contributor

Unsubstituted generic types shouldn't have a size, precisely because the generic parameters aren't substituted in. Always emit them with a size 0.

(cherry picked from commit 128d452)

Explanation: When emitting debug information for unsubstituted generic types, the size of the type can't be known, since the generics haven't been substituted in yet. This patch fixes that by emitting them with a size of 0.
Scope: Affects debug info generation of generic types when compiling with -gdwarf-types, or for embedded Swift.
Risk: Low. Only affects debug info generation for generics in some situations.
Reviewer: @adrian-prantl
Main branch PR: #72445

Unsubstituted generic types shouldn't have a size, precisely because
the generic parameters aren't substituted in. Always emit them with a
size 0.

(cherry picked from commit 128d452)
@augusto2112 augusto2112 requested a review from a team as a code owner May 3, 2024 20:22
@augusto2112 augusto2112 requested a review from adrian-prantl May 3, 2024 20:22
@augusto2112
Copy link
Contributor Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit aa6fcbc into swiftlang:release/6.0 May 4, 2024
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.

2 participants