This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Fix assertion failure in EmitCallArg
ClosedPublic

Authored by ahatanak on Jun 26 2017, 10:02 PM.

Details

Summary

The assertion is checking that the types of the parameter and argument match. It fails when a method of a parameterized class is called. To fix the failure, this patch moves the assertion in EmitCallArg to its only caller EmitCallArgs.

Instead of moving the assertion, it's also possible to call substObjCMemberType in EmitCallArgs (the template function in CodeGenFunction.h) to compute the correct parameter type and pass it down.

rdar://problem/32874473

Diff Detail

Repository
rL LLVM

Event Timeline

ahatanak created this revision.Jun 26 2017, 10:02 PM
rjmccall accepted this revision.Jun 27 2017, 11:39 AM

This seems fine, thanks.

This revision is now accepted and ready to land.Jun 27 2017, 11:39 AM
This revision was automatically updated to reflect the committed changes.