From: Benjamin Kramer Date: Mon, 30 Sep 2013 15:52:50 +0000 (+0000) Subject: BoundsChecking: Fix refacto. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b313a93be77c88ddac3eee553bdf9199c26bfd74;p=oota-llvm.git BoundsChecking: Fix refacto. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191676 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Instrumentation/BoundsChecking.cpp b/lib/Transforms/Instrumentation/BoundsChecking.cpp index 031577ac3f8..4a9e9503675 100644 --- a/lib/Transforms/Instrumentation/BoundsChecking.cpp +++ b/lib/Transforms/Instrumentation/BoundsChecking.cpp @@ -82,6 +82,7 @@ BasicBlock *BoundsChecking::getTrapBB() { Function *Fn = Inst->getParent()->getParent(); IRBuilder<>::InsertPointGuard Guard(*Builder); TrapBB = BasicBlock::Create(Fn->getContext(), "trap", Fn); + Builder->SetInsertPoint(TrapBB); llvm::Value *F = Intrinsic::getDeclaration(Fn->getParent(), Intrinsic::trap); CallInst *TrapCall = Builder->CreateCall(F);