forked from OSchip/llvm-project
parent
3c6963b806
commit
6307cf0aa3
|
@ -3810,15 +3810,16 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
|||
// Enter a try block:
|
||||
// - Call objc_exception_try_enter to push ExceptionData on top of
|
||||
// the EH stack.
|
||||
CGF.EmitNounwindRuntimeCall(ObjCTypes.getExceptionTryEnterFn(), ExceptionData);
|
||||
CGF.EmitNounwindRuntimeCall(ObjCTypes.getExceptionTryEnterFn(),
|
||||
ExceptionData);
|
||||
|
||||
// - Call setjmp on the exception data buffer.
|
||||
llvm::Constant *Zero = llvm::ConstantInt::get(CGF.Builder.getInt32Ty(), 0);
|
||||
llvm::Value *GEPIndexes[] = { Zero, Zero, Zero };
|
||||
llvm::Value *SetJmpBuffer =
|
||||
CGF.Builder.CreateGEP(ExceptionData, GEPIndexes, "setjmp_buffer");
|
||||
llvm::CallInst *SetJmpResult =
|
||||
CGF.EmitNounwindRuntimeCall(ObjCTypes.getSetJmpFn(), SetJmpBuffer, "setjmp_result");
|
||||
llvm::CallInst *SetJmpResult = CGF.EmitNounwindRuntimeCall(
|
||||
ObjCTypes.getSetJmpFn(), SetJmpBuffer, "setjmp_result");
|
||||
SetJmpResult->setCanReturnTwice();
|
||||
|
||||
// If setjmp returned 0, enter the protected block; otherwise,
|
||||
|
|
Loading…
Reference in New Issue