Page MenuHomePhabricator

[CodeGen][ObjC] Fix assertion failure in CodeGenFunction::EmitARCStoreStrongCall
ClosedPublic

Authored by ahatanak on May 30 2017, 3:37 PM.

Details

Summary

The assertion fails because CGObjCRuntime::EmitValueForIvarAtOffset doesn't get the correct type of the ivar when the class the ivar belongs to is parameterized. It assigns the type of the ivar in the parameterized base class, instead of the type in the derived class, to IvarTy. This eventually causes an assertion failure in CodeGenFunction::EmitARCStoreStrongCall because of a mismatch between the types of the address and the value being stored.

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak created this revision.May 30 2017, 3:37 PM
rjmccall accepted this revision.May 31 2017, 9:49 AM

LGTM.

This revision is now accepted and ready to land.May 31 2017, 9:49 AM
This revision was automatically updated to reflect the committed changes.