aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
commit6a0ce750f795be672b0cbe58d963d4d49d2cd90c (patch)
tree7e7df0b6382394e80994324523f517fc163f713a /include
parentaf35841f2e346f9259606886698c188280406cdb (diff)
downloadexternal_llvm-6a0ce750f795be672b0cbe58d963d4d49d2cd90c.zip
external_llvm-6a0ce750f795be672b0cbe58d963d4d49d2cd90c.tar.gz
external_llvm-6a0ce750f795be672b0cbe58d963d4d49d2cd90c.tar.bz2
If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/IRBuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 3878e79..147b520 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/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)