mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
There is now only one version of eh.selector and eh.typeid.for.
Fix the clang build. llvm-svn: 84107
This commit is contained in:
@@ -1643,17 +1643,12 @@ void CGObjCGNU::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
|
||||
// Get the correct versions of the exception handling intrinsics
|
||||
llvm::TargetData td = llvm::TargetData::TargetData(&TheModule);
|
||||
int PointerWidth = td.getTypeSizeInBits(PtrTy);
|
||||
assert((PointerWidth == 32 || PointerWidth == 64) &&
|
||||
"Can't yet handle exceptions if pointers are not 32 or 64 bits");
|
||||
llvm::Value *llvm_eh_exception =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_exception);
|
||||
llvm::Value *llvm_eh_selector = PointerWidth == 32 ?
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_selector_i32) :
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_selector_i64);
|
||||
llvm::Value *llvm_eh_typeid_for = PointerWidth == 32 ?
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for_i32) :
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for_i64);
|
||||
llvm::Value *llvm_eh_selector =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_selector);
|
||||
llvm::Value *llvm_eh_typeid_for =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for);
|
||||
|
||||
// Exception object
|
||||
llvm::Value *Exc = CGF.Builder.CreateCall(llvm_eh_exception, "exc");
|
||||
|
||||
@@ -5425,10 +5425,10 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
|
||||
llvm::Value *llvm_eh_exception =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_exception);
|
||||
llvm::Value *llvm_eh_selector_i64 =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_selector_i64);
|
||||
llvm::Value *llvm_eh_typeid_for_i64 =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for_i64);
|
||||
llvm::Value *llvm_eh_selector =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_selector);
|
||||
llvm::Value *llvm_eh_typeid_for =
|
||||
CGF.CGM.getIntrinsic(llvm::Intrinsic::eh_typeid_for);
|
||||
llvm::Value *Exc = CGF.Builder.CreateCall(llvm_eh_exception, "exc");
|
||||
llvm::Value *RethrowPtr = CGF.CreateTempAlloca(Exc->getType(), "_rethrow");
|
||||
|
||||
@@ -5490,7 +5490,7 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
}
|
||||
|
||||
llvm::Value *Selector =
|
||||
CGF.Builder.CreateCall(llvm_eh_selector_i64,
|
||||
CGF.Builder.CreateCall(llvm_eh_selector,
|
||||
SelectorArgs.begin(), SelectorArgs.end(),
|
||||
"selector");
|
||||
for (unsigned i = 0, e = Handlers.size(); i != e; ++i) {
|
||||
@@ -5506,7 +5506,7 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
llvm::BasicBlock *Match = CGF.createBasicBlock("match");
|
||||
Next = CGF.createBasicBlock("catch.next");
|
||||
llvm::Value *Id =
|
||||
CGF.Builder.CreateCall(llvm_eh_typeid_for_i64,
|
||||
CGF.Builder.CreateCall(llvm_eh_typeid_for,
|
||||
CGF.Builder.CreateBitCast(SelectorArgs[i+2],
|
||||
ObjCTypes.Int8PtrTy));
|
||||
CGF.Builder.CreateCondBr(CGF.Builder.CreateICmpEQ(Selector, Id),
|
||||
@@ -5557,7 +5557,7 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
Args.push_back(ObjCTypes.getEHPersonalityPtr());
|
||||
Args.push_back(llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext),
|
||||
0));
|
||||
CGF.Builder.CreateCall(llvm_eh_selector_i64, Args.begin(), Args.end());
|
||||
CGF.Builder.CreateCall(llvm_eh_selector, Args.begin(), Args.end());
|
||||
CGF.Builder.CreateStore(Exc, RethrowPtr);
|
||||
CGF.EmitBranchThroughCleanup(FinallyRethrow);
|
||||
|
||||
@@ -5589,7 +5589,7 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
|
||||
Args.push_back(ObjCTypes.getEHPersonalityPtr());
|
||||
Args.push_back(llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext),
|
||||
0));
|
||||
CGF.Builder.CreateCall(llvm_eh_selector_i64, Args.begin(), Args.end());
|
||||
CGF.Builder.CreateCall(llvm_eh_selector, Args.begin(), Args.end());
|
||||
CGF.Builder.CreateStore(Exc, RethrowPtr);
|
||||
CGF.EmitBranchThroughCleanup(FinallyRethrow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user