[llvm-commits] [llvm] r130874 - /llvm/trunk/include/llvm/Support/IRBuilder.h

Devang Patel dpatel at apple.com
Wed May 4 14:57:22 PDT 2011


Author: dpatel
Date: Wed May  4 16:57:22 2011
New Revision: 130874

URL: http://llvm.org/viewvc/llvm-project?rev=130874&view=rev
Log:
If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.

Modified:
    llvm/trunk/include/llvm/Support/IRBuilder.h

Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=130874&r1=130873&r2=130874&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Wed May  4 16:57:22 2011
@@ -324,6 +324,7 @@
   explicit IRBuilder(Instruction *IP)
     : IRBuilderBase(IP->getContext()), Folder() {
     SetInsertPoint(IP);
+    SetCurrentDebugLocation(IP->getDebugLoc());
   }
   
   IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, const T& F)





More information about the llvm-commits mailing list