forked from OSchip/llvm-project
parent
6e931528fe
commit
f00472908a
|
@ -82,6 +82,7 @@ BasicBlock *BoundsChecking::getTrapBB() {
|
||||||
Function *Fn = Inst->getParent()->getParent();
|
Function *Fn = Inst->getParent()->getParent();
|
||||||
IRBuilder<>::InsertPointGuard Guard(*Builder);
|
IRBuilder<>::InsertPointGuard Guard(*Builder);
|
||||||
TrapBB = BasicBlock::Create(Fn->getContext(), "trap", Fn);
|
TrapBB = BasicBlock::Create(Fn->getContext(), "trap", Fn);
|
||||||
|
Builder->SetInsertPoint(TrapBB);
|
||||||
|
|
||||||
llvm::Value *F = Intrinsic::getDeclaration(Fn->getParent(), Intrinsic::trap);
|
llvm::Value *F = Intrinsic::getDeclaration(Fn->getParent(), Intrinsic::trap);
|
||||||
CallInst *TrapCall = Builder->CreateCall(F);
|
CallInst *TrapCall = Builder->CreateCall(F);
|
||||||
|
|
Loading…
Reference in New Issue