forked from OSchip/llvm-project
Emit block capture initializers as if they were normal initializers for a local
variable that just happens to be stored in a wierd place. llvm-svn: 127235
This commit is contained in:
parent
91ca10fe64
commit
5c8f6c47c4
|
@ -630,7 +630,9 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const BlockExpr *blockExpr) {
|
|||
|
||||
ImplicitCastExpr l2r(ImplicitCastExpr::OnStack, type, CK_LValueToRValue,
|
||||
declRef, VK_RValue);
|
||||
EmitAnyExprToMem(&l2r, blockField, /*volatile*/ false, /*init*/ true);
|
||||
EmitExprAsInit(&l2r, variable, blockField,
|
||||
getContext().getDeclAlign(variable),
|
||||
/*captured by init*/ false);
|
||||
}
|
||||
|
||||
// Push a destructor if necessary. The semantics for when this
|
||||
|
|
Loading…
Reference in New Issue