-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: The type layout of a metatype is not the same as the NativeObj… #14891
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
IRGen: The type layout of a metatype is not the same as the NativeObj… #14891
Conversation
…ect.Type rdar://37924505
@swift-ci Please test |
Hmm, maybe I can tighten this up more by distinguishing between ExistentialMetatypeType and MetatypeType. |
@swift-ci Please smoke test |
Build failed |
Build failed |
lib/IRGen/GenMeta.cpp
Outdated
} else { | ||
// Thick metatypes look like pointers with spare bits. | ||
return emitFromValueWitnessTable( | ||
CanMetatypeType::get(IGF.IGM.Context.TheNativeObjectType)); |
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.
Should this just fall through, since the ObjC case below is the same?
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.
I find conditional fall-throughs rather confusing. They have the potential issue that you could modify the code in the future that we fall through to in a way that is only meant for latter case (not the case we fall-through from) without realizing, similar when you add a case to the switch. Is this a likely scenario here? Maybe not.
Anyways, I defer to you.
@swift-ci Please test |
Build failed |
Build failed |
…ect.Type
rdar://37924505