-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Class stub fixes and execution tests #23846
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
Class stub fixes and execution tests #23846
Conversation
@swift-ci Please test |
return; | ||
|
||
if (!hasObjCResilientClassStub(IGM, getType())) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the first condition not part of what the second function checks? I could see if this is a definition-vs-use situation, but we're always at the definition site here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I factored it so that hasObjCResilientClassStub()
asserts the first condition here. I guess it makes sense to change it around.
|
||
// REQUIRES: executable_test | ||
// REQUIRES: objc_interop | ||
// XFAIL: * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to make this a dynamic condition, like test/Interpreter/SDK/class_getImageName.swift?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responded offline.
611048d
to
df1f47a
Compare
This was an oversight. I was setting the flag but not emitting the pointer at the end.
If a class has resilient metadata from our point of view, it might still not have a class stub, if its entire inheritance chain is defined in a single module. Note that inserting a superclass is still a resilient operation; the only way to change a class from having static metadata to having a class stub is to change it's root class, which is not something we can do resiliently.
Fixes <rdar://49090613>, except they're disabled for the time being.
df1f47a
to
7c8641c
Compare
apple/swift-clang#301 |
Fixes rdar://problem/49090613.