Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Aug 22, 2024

_mangledTypeName() returns the Swift-mangled typename of a given type. This PR extends it to take non-copyable types as well.

Related to our use case in Swift Testing, but not to the PR directly: #69146 #69147 #71112

Resolves rdar://134278607.

@grynspan grynspan added feature A feature request or implementation runtime The Swift Runtime mangling Area → compiler: Mangling move-only Feature → type declarations: Move-only type declarations labels Aug 22, 2024
@grynspan grynspan requested review from mikeash, al45tair and tbkka August 22, 2024 16:56
@grynspan grynspan self-assigned this Aug 22, 2024
@grynspan grynspan requested review from rjmccall and a team as code owners August 22, 2024 16:56
@grynspan
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@tbkka tbkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume this will change again soon for ~Escapable?

@tbkka
Copy link
Contributor

tbkka commented Aug 22, 2024

Hmmm.... Test "demangleToMetadata" crashed on Linux.

Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Have you verified that _mangledTypeName does in fact have the same symbol name?

And while you're in here, could you also make it accept ~Escapable? I assume we'll want that at some point and might as well do it now.

@Azoy
Copy link
Contributor

Azoy commented Aug 22, 2024

@mikeash we have a lovely ABI test that tracks changes to stdlib symbols now, so that will fail if the symbol does change

@grynspan
Copy link
Contributor Author

Looks good. Have you verified that _mangledTypeName does in fact have the same symbol name?

Not yet!

@grynspan
Copy link
Contributor Author

Hmmm.... Test "demangleToMetadata" crashed on Linux.

I believe this is a known compiler bug that's filed under another radar right now. This change may be blocked on that fix.

@grynspan
Copy link
Contributor Author

@swift-ci test

5 similar comments
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

grynspan commented Sep 3, 2024

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

…pes.

`_mangledTypeName()` returns the Swift-mangled typename of a given type. This
PR extends it to take non-copyable types as well.

Resolves rdar://134278607.
@grynspan grynspan force-pushed the jgrynspan/134278607-mangledtypename-noncopyable branch from 0f1c02c to 6390152 Compare September 11, 2024 13:21
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit db7a030 into main Sep 11, 2024
5 checks passed
@grynspan grynspan deleted the jgrynspan/134278607-mangledtypename-noncopyable branch September 11, 2024 20:12
grynspan added a commit that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation mangling Area → compiler: Mangling move-only Feature → type declarations: Move-only type declarations runtime The Swift Runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants