summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-04 21:57:22 +0000
committerDevang Patel <dpatel@apple.com>2011-05-04 21:57:22 +0000
commit1fb95c996b311d8712223a9f0bc8c8478dd357e0 (patch)
tree812d176d94c7a254b525affc6dd6219510a2d2eb
parentb4f4d512add4c2b5276767d2d61d6a84ef3e398b (diff)
downloadbcm5719-llvm-1fb95c996b311d8712223a9f0bc8c8478dd357e0.tar.gz
bcm5719-llvm-1fb95c996b311d8712223a9f0bc8c8478dd357e0.zip
If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.
llvm-svn: 130874
-rw-r--r--llvm/include/llvm/Support/IRBuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/IRBuilder.h b/llvm/include/llvm/Support/IRBuilder.h
index 3878e793dbe..147b520a723 100644
--- a/llvm/include/llvm/Support/IRBuilder.h
+++ b/llvm/include/llvm/Support/IRBuilder.h
@@ -324,6 +324,7 @@ public:
explicit IRBuilder(Instruction *IP)
: IRBuilderBase(IP->getContext()), Folder() {
SetInsertPoint(IP);
+ SetCurrentDebugLocation(IP->getDebugLoc());
}
IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, const T& F)
OpenPOWER on IntegriCloud