This is an archive of the discontinued LLVM Phabricator instance.

Also synthesize _cmd and self for properties
ClosedPublic

Authored by MadCoder on Dec 9 2019, 1:34 PM.

Diff Detail

Event Timeline

MadCoder created this revision.Dec 9 2019, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2019, 1:34 PM

@liuliu that fixes your test case (which I reproduced in the CG test)

It'd be nice if we didn't have to synthesize parameters for all declarations when we're just handling an @interface, but we can improve that in follow-ups.

arphaman accepted this revision.Dec 9 2019, 1:47 PM

LGTM

This revision is now accepted and ready to land.Dec 9 2019, 1:47 PM

It'd be nice if we didn't have to synthesize parameters for all declarations when we're just handling an @interface, but we can improve that in follow-ups.

yeah ideally I'd want to do it lazily when we emit the direct call, but at this point the Decl is const and that was a huge change to make.

Alternatively, we could make IRGen not depend on those parameters being set just to call a function, which seems reasonable since the parameter variables are logically internal to the implementation.

This revision was automatically updated to reflect the committed changes.

Thanks. Verified in our codebase this patch indeed fixed the crashes!