summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-12-13 23:37:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-12-13 23:37:17 +0000
commitf5f4d2fd2e47463276a310dc5164dfbcdb582f1c (patch)
tree342c137b9527268110cfb1dde559647b78559e60 /clang/lib/CodeGen/CGClass.cpp
parent7bb2f97a90c73e709ac299947dae2cd7b4953af3 (diff)
downloadbcm5719-llvm-f5f4d2fd2e47463276a310dc5164dfbcdb582f1c.tar.gz
bcm5719-llvm-f5f4d2fd2e47463276a310dc5164dfbcdb582f1c.zip
Make sure the __invoke function for lambdas returns properly. Per bug report on IRC>
llvm-svn: 170160
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index b2225e48e36..9df8905bcd0 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -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() {
OpenPOWER on IntegriCloud