aboutsummaryrefslogtreecommitdiff
path: root/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
commit50f089a6e1837cb81f8d1830bda6db619e422a2e (patch)
tree78386e46a4f33ff2bcd8c05997108c33bcfff6b3 /lib/CodeGen/CGClass.cpp
parentc9a9177e699897a71670ae211fa053240f41460e (diff)
Make sure the __invoke function for lambdas returns properly. Per bug report on IRC>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index b2225e48e3..9df8905bcd 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/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() {