Make sure the __invoke function for lambdas returns properly. Per bug report on IRC>

llvm-svn: 170160
This commit is contained in:
Eli Friedman
2012-12-13 23:37:17 +00:00
parent 7bb2f97a90
commit f5f4d2fd2e
2 changed files with 11 additions and 0 deletions

View File

@@ -1787,6 +1787,8 @@ void CodeGenFunction::EmitForwardingCallToLambda(const CXXRecordDecl *lambda,
// If necessary, copy the returned value into the slot.
if (!resultType->isVoidType() && returnSlot.isNull())
EmitReturnOfRValue(RV, resultType);
else
EmitBranchThroughCleanup(ReturnBlock);
}
void CodeGenFunction::EmitLambdaBlockInvokeBody() {