From: Devang Patel Date: Wed, 4 May 2011 21:57:22 +0000 (+0000) Subject: If builder is initialized using an instruction as insertion point, then use the instr... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a0ce750f795be672b0cbe58d963d4d49d2cd90c;p=oota-llvm.git 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 --- diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 3878e793dbe..147b520a723 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)