summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-07-09 17:54:22 +0000
committerNadav Rotem <nrotem@apple.com>2013-07-09 17:54:22 +0000
commitbcd5a0f7efa75eb48c88e0e94168ed7c77b6575d (patch)
tree67af95476bfb3e63bb94ba1e2221dc5374fdcb46 /include
parentbd6f1f6896275e04ce46c9ef82fd96e2e6c125dd (diff)
downloadllvm-bcd5a0f7efa75eb48c88e0e94168ed7c77b6575d.tar.gz
llvm-bcd5a0f7efa75eb48c88e0e94168ed7c77b6575d.tar.bz2
llvm-bcd5a0f7efa75eb48c88e0e94168ed7c77b6575d.tar.xz
IRBuilder: add an assertion that checks if we try to get a debug loc from ->end();
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/IR/IRBuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h
index cdf840f541..80a2ede4da 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -90,6 +90,7 @@ public:
void SetInsertPoint(Instruction *I) {
BB = I->getParent();
InsertPt = I;
+ assert(I != BB->end() && "Can't read debug loc from end()");
SetCurrentDebugLocation(I->getDebugLoc());
}