Commits
Michael Gottesman committed 2e37bef050c
[irgen] Use object_getClass instead of object_getType() when lowering objc existential_metatype instructions. Previously, we were not respecting the representation of the existential metatype and were treating all existential metatypes as if the metatype was a thick metatype. Instead now we properly grab the instance of the class from the existential and then query the runtime for the objc_class. This is done via the new entrypoint emitHeapMetadataRefForUnknownHeapObject. I also modified emitHeapMetadataRefForHeapObject to use emitHeapMetadataRefForUnknownHeapObject instead of emitLoadOfObjCHeapMetadataRef since the latter does not properly handle tagged pointers. This bug was found on inspection when Joe and I were talking about this change. rdar://18841292 Swift SVN r23308