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 b4f4d512ad
commit 1fb95c996b
1 changed files with 1 additions and 0 deletions

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)