CodeGen: handle blocks correctly when inalloca'ed
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 21 Feb 2018 21:47:51 +0000 (21:47 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 21 Feb 2018 21:47:51 +0000 (21:47 +0000)
commitc1b46381dbfc070ccdba327d36053c154cde2b4f
tree2b25cc709ba0f3fa78092abfb8d1cc028155d5d3
parent2a129dc31bad7c90fc70056171cab40fe5059fca
CodeGen: handle blocks correctly when inalloca'ed

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.

llvm-svn: 325724
clang/lib/CodeGen/CGDecl.cpp
clang/test/CodeGenCXX/block-inalloca.cpp [new file with mode: 0644]