From 6a0ce750f795be672b0cbe58d963d4d49d2cd90c Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 4 May 2011 21:57:22 +0000 Subject: [PATCH] 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 --- include/llvm/Support/IRBuilder.h | 1 + 1 file changed, 1 insertion(+) 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) -- 2.34.1