Skip to content

[Debug Info] Emit -gdwarf-types debug info for Builtin.FixedArray<> #79181

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 3 commits into from
Feb 18, 2025

Conversation

adrian-prantl
Copy link
Contributor

This commit also changes how specialized types are being emitted. Previously we
would not emitthe detailed member information in the specialized type itself,
and instead rely on the fact that it was present in the unspecialized type,
however, this wold prevent us from emitting any bound generic members, so we're
now emitting the members in both variants of the type.

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#9970
@swift-ci test macOS

@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#9970
@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test macOS

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl adrian-prantl force-pushed the gdwarf-fixed-array branch 3 times, most recently from c50ab3b to b373a5c Compare February 12, 2025 21:48
@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

@adrian-prantl
Copy link
Contributor Author

Renamed Slab.

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

Linux test failure is unrelated.

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

1 similar comment
@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test windows

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

1 similar comment
@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

This commit also changes how specialized types are being emitted. Previously we
would not emitthe detailed member information in the specialized type itself,
and instead rely on the fact that it was present in the unspecialized type,
however, this wold prevent us from emitting any bound generic members, so we're
now emitting the members in both variants of the type.

This uncovered a with type aliases that this commit also addresses: Because we
don't canonicalize types prior to caching in order to preserve type sugar,
alternative representations of recursive types (with one or more levels of
recursion unfolded) could create potential infinite chains of types. This is
addressed by checking whether a sugared type has an already emitted canonical
representation first, and if yes, creating a typedef node pointing directly to
it.

The donwside of doing this is that it can lead to the disappearnce of type
aliases definitions when they are used as parameters in bound generic
types. However, we still preserve that a type was `MyClass<MyAlias>`. We just
might have a typedef pointing director from `MyClass<MyAlias>` ->
`MyClass<CanonicalType>`.

rdar://144315592
@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci smoke test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

1 similar comment
@adrian-prantl
Copy link
Contributor Author

@swift-ci test linux

@adrian-prantl
Copy link
Contributor Author

@swift-ci test

@adrian-prantl
Copy link
Contributor Author

@swift-ci test source compatibility

@adrian-prantl adrian-prantl merged commit a4a3a41 into swiftlang:main Feb 18, 2025
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.

3 participants