From: Bill Wendling Date: Mon, 19 Dec 2011 23:53:28 +0000 (+0000) Subject: Mark the calls to the _setjmp function as returns twice. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6446c3e3600032c5f17ca2324a4581b9301afa59;p=clang Mark the calls to the _setjmp function as returns twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146926 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index c3cca394a8..121395676f 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/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");