If builder is initialized using an instruction as insertion point, then use the instruction's debug location as current debug location.

llvm-svn: 130874
This commit is contained in:
Devang Patel 2011-05-04 21:57:22 +00:00
parent e077bd8a58
commit 7f23f2aba6

View File

@ -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)