summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit2315c2e618626e6a339260286bf00986815219a1 (patch)
tree41cd2c2016fd897abaab394795a7da771ba11096 /llvm/include
parent6c4a0f08160b8237d2cfaf95fc5a51a4c9e1203f (diff)
downloadbcm5719-llvm-2315c2e618626e6a339260286bf00986815219a1.tar.gz
bcm5719-llvm-2315c2e618626e6a339260286bf00986815219a1.zip
IRBuilder: add an assertion that checks if we try to get a debug loc from ->end();
llvm-svn: 185952
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/IRBuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index cdf840f5415..80a2ede4da1 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/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());
}
OpenPOWER on IntegriCloud