Assing line number info to new PHIs created by SSA updater.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130551 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2011-04-29 22:28:59 +00:00
parent d94bc549fc
commit 40348e8d1f
3 changed files with 22 additions and 0 deletions

View File

@ -21,8 +21,10 @@
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
#include "llvm/Transforms/Utils/SSAUpdaterImpl.h"
using namespace llvm;
typedef DenseMap<BasicBlock*, Value*> AvailableValsTy;
@ -185,6 +187,9 @@ Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) {
return V;
}
// Set DebugLoc.
InsertedPHI->setDebugLoc(GetFirstDebugLocInBasicBlock(BB));
// If the client wants to know about all new instructions, tell it.
if (InsertedPHIs) InsertedPHIs->push_back(InsertedPHI);