This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: handle blocks correctly when inalloca'ed
ClosedPublic

Authored by compnerd on Feb 21 2018, 10:19 AM.

Details

Reviewers
rnk
rjmccall
Summary

When using blocks with C++ on Windows x86, it is possible to have the
block literal be pushed into the inalloca'ed parameters. Teach IRGen to
handle the case properly by extracting the block literal from the
inalloca parameter. This fixes the use of blocks with C++ on Windows
x86.

Diff Detail

Repository
rC Clang

Event Timeline

compnerd created this revision.Feb 21 2018, 10:19 AM

Patch is missing context.

lib/CodeGen/CGDecl.cpp
1851

This comment needs to be updated.

compnerd updated this revision to Diff 135304.Feb 21 2018, 11:40 AM

Update comment

compnerd marked an inline comment as done.Feb 21 2018, 11:40 AM
rjmccall accepted this revision.Feb 21 2018, 1:32 PM

I hate inalloca so much. Okay.

This revision is now accepted and ready to land.Feb 21 2018, 1:32 PM
compnerd closed this revision.Feb 21 2018, 1:52 PM

SVN r325724