Set debug location while setting insertion point.
authorDevang Patel <dpatel@apple.com>
Wed, 18 May 2011 20:58:47 +0000 (20:58 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 18 May 2011 20:58:47 +0000 (20:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131575 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/IRBuilder.h

index 147b520a72372027a6565352ae8b9ba4e8fefd6a..ea3e6b4ad54b0d077d451d0c6b7370c7433e9930 100644 (file)
@@ -80,6 +80,7 @@ public:
   void SetInsertPoint(Instruction *I) {
     BB = I->getParent();
     InsertPt = I;
+    SetCurrentDebugLocation(I->getDebugLoc());
   }
   
   /// SetInsertPoint - This specifies that created instructions should be