diff options
author | Devang Patel <dpatel@apple.com> | 2011-04-29 22:28:59 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-04-29 22:28:59 +0000 |
commit | a8e7411c743b491adabe2567593b07189dd1bedd (patch) | |
tree | 1857eb7d3da158ffe4024da2f345b6c5e5575347 /llvm/lib/Transforms/Utils/SSAUpdater.cpp | |
parent | 52a8cca56fe56914f3186c6758f764f26ef4f2e3 (diff) | |
download | bcm5719-llvm-a8e7411c743b491adabe2567593b07189dd1bedd.tar.gz bcm5719-llvm-a8e7411c743b491adabe2567593b07189dd1bedd.zip |
Assing line number info to new PHIs created by SSA updater.
llvm-svn: 130551
Diffstat (limited to 'llvm/lib/Transforms/Utils/SSAUpdater.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SSAUpdater.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SSAUpdater.cpp b/llvm/lib/Transforms/Utils/SSAUpdater.cpp index cd7f06844f4..2860c3e511a 100644 --- a/llvm/lib/Transforms/Utils/SSAUpdater.cpp +++ b/llvm/lib/Transforms/Utils/SSAUpdater.cpp @@ -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); |