summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/BoundsChecking.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-09-30 15:52:50 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-09-30 15:52:50 +0000
commitb313a93be77c88ddac3eee553bdf9199c26bfd74 (patch)
treeb13347ef92b97dc7d604f0f317cad0ef35fca71a /lib/Transforms/Instrumentation/BoundsChecking.cpp
parentd4278821665aa97f5fc0d19a32ff1fb39a22d395 (diff)
downloadllvm-b313a93be77c88ddac3eee553bdf9199c26bfd74.tar.gz
llvm-b313a93be77c88ddac3eee553bdf9199c26bfd74.tar.bz2
llvm-b313a93be77c88ddac3eee553bdf9199c26bfd74.tar.xz
BoundsChecking: Fix refacto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/BoundsChecking.cpp')
-rw-r--r--lib/Transforms/Instrumentation/BoundsChecking.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/BoundsChecking.cpp b/lib/Transforms/Instrumentation/BoundsChecking.cpp
index 031577ac3f..4a9e950367 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);