summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-12-19 23:53:28 +0000
committerBill Wendling <isanbard@gmail.com>2011-12-19 23:53:28 +0000
commitbd26cf90dc86b32fab7fc01e2a2df04bed93cec3 (patch)
tree656fe53e2901868ad97b4744c6e90ddc52b17844 /clang/lib/CodeGen/CGObjCMac.cpp
parent045b6c71a60f9e942f52c3ad95fa4c48165d7f0a (diff)
downloadbcm5719-llvm-bd26cf90dc86b32fab7fc01e2a2df04bed93cec3.tar.gz
bcm5719-llvm-bd26cf90dc86b32fab7fc01e2a2df04bed93cec3.zip
Mark the calls to the _setjmp function as returns twice. <rdar://problem/10492556>
llvm-svn: 146926
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index c3cca394a84..121395676fd 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -3045,6 +3045,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
llvm::CallInst *SetJmpResult =
CGF.Builder.CreateCall(ObjCTypes.getSetJmpFn(), SetJmpBuffer, "setjmp_result");
SetJmpResult->setDoesNotThrow();
+ SetJmpResult->setCanReturnTwice();
// If setjmp returned 0, enter the protected block; otherwise,
// branch to the handler.
@@ -3110,6 +3111,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
CGF.Builder.CreateCall(ObjCTypes.getSetJmpFn(), SetJmpBuffer,
"setjmp.result");
SetJmpResult->setDoesNotThrow();
+ SetJmpResult->setCanReturnTwice();
llvm::Value *Threw =
CGF.Builder.CreateIsNotNull(SetJmpResult, "did_catch_exception");
OpenPOWER on IntegriCloud