-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Mangling] Add a new mangling for opaque return type to use when mangling an ObjC runtime name #33035
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
I think we need to implement a real mangling here. The ObjC runtime name can become load-bearing ABI, if the class name ends up being used in a keyed archiver, nib, or other serialized format, and it needs to be unique relative to any other class names that might be instantiated in the process. |
@jckarter, I have used a new Given we don't allow overloading with opaque return types, I think the new mangled name should be completely unique. Is my assumption correct? |
I think that should work. |
@jckarter Great! Thank you! I'll add this to |
@jckarter I have added it to |
Looks good to me. Thanks! |
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please test Linux |
This needs an executable test in test/Interpreter/ which prints the runtime name. Otherwise we don't know if the mangling works as specified or not. |
@slavapestov Sure, I have added some new tests here: #33340 |
The old remangler does not handle opaque result types and can crash when mangling an ObjC runtime name for a class that is in a local context that returns an opaque type, for example:
Introduce a new
Qu
mangling to represent the opaque return type in old mangling.Resolves SR-13203