]> granicus.if.org Git - clang/commitdiff
Mark the calls to the _setjmp function as returns twice. <rdar://problem/10492556>
authorBill Wendling <isanbard@gmail.com>
Mon, 19 Dec 2011 23:53:28 +0000 (23:53 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 19 Dec 2011 23:53:28 +0000 (23:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146926 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index c3cca394a84cc52fabd5540dba75b8580ed99784..121395676fdffb17f5fa66d0e25f2ad3b16b07b3 100644 (file)
@@ -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");