This is an archive of the discontinued LLVM Phabricator instance.

[ObjC] Use the name specified by objc_runtime_name instead of the class identifier
ClosedPublic

Authored by ahatanak on Mar 30 2018, 11:46 AM.

Details

Summary

This patch fixes a few places in CGObjCMac.cpp where the class identifier was used instead of the name specified by objc_runtime_name.

rdar://problem/37910822

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak created this revision.Mar 30 2018, 11:46 AM

Note that CGObjCNonFragileABIMac::EmitClassRef also passes the class identifier to CGObjCNonFragileABIMac::EmitClassRefFromId, but it doesn't cause a problem. CGObjCNonFragileABIMac::EmitClassRefFromId uses the identifier only when the ObjCInterfaceDecl passed to it is null and that happens only when it is called from CGObjCNonFragileABIMac::EmitNSAutoreleasePoolClassRef.

rjmccall accepted this revision.Mar 30 2018, 8:19 PM

Note that CGObjCNonFragileABIMac::EmitClassRef also passes the class identifier to CGObjCNonFragileABIMac::EmitClassRefFromId, but it doesn't cause a problem. CGObjCNonFragileABIMac::EmitClassRefFromId uses the identifier only when the ObjCInterfaceDecl passed to it is null and that happens only when it is called from CGObjCNonFragileABIMac::EmitNSAutoreleasePoolClassRef.

Hmm. Alright.

LGTM.

This revision is now accepted and ready to land.Mar 30 2018, 8:19 PM
This revision was automatically updated to reflect the committed changes.