diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-04 21:57:22 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-04 21:57:22 +0000 |
commit | 6a0ce750f795be672b0cbe58d963d4d49d2cd90c (patch) | |
tree | 7e7df0b6382394e80994324523f517fc163f713a /include | |
parent | af35841f2e346f9259606886698c188280406cdb (diff) | |
download | external_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.h | 1 |
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) |