This is an archive of the discontinued LLVM Phabricator instance.

Fix crash when emitting NullReturn guards for functions returning BOOL
ClosedPublic

Authored by jroelofs on Jan 20 2021, 10:25 AM.

Details

Reviewers
rjmccall
arphaman
Summary

CodeGenModule::EmitNullConstant() creates constants with their "in memory" type, not their "in vregs" type. The one place where this difference matters is when the type is _Bool, as that is an i1 when in vregs and an i8 in memory.

Fixes: rdar://73361264

Diff Detail

Event Timeline

jroelofs requested review of this revision.Jan 20 2021, 10:25 AM
jroelofs created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2021, 10:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jroelofs updated this revision to Diff 317959.Jan 20 2021, 11:46 AM

Fix formatting.

rjmccall accepted this revision.Jan 21 2021, 1:40 PM

Oops. LGTM.

This revision is now accepted and ready to land.Jan 21 2021, 1:40 PM