diff options
author | Eli Bendersky <eli.bendersky@intel.com> | 2012-06-25 10:13:14 +0000 |
---|---|---|
committer | Eli Bendersky <eli.bendersky@intel.com> | 2012-06-25 10:13:14 +0000 |
commit | f0ad3606c7c6e8867c2e4ac88605500cb895d55f (patch) | |
tree | c2abe8553027624e51ac7c1f98f4ed111b4e09a7 /llvm/lib/Transforms/Utils/SSAUpdater.cpp | |
parent | 0e0832bfdb36c421f5c1d382a15bacdeead07e2c (diff) | |
download | bcm5719-llvm-f0ad3606c7c6e8867c2e4ac88605500cb895d55f.tar.gz bcm5719-llvm-f0ad3606c7c6e8867c2e4ac88605500cb895d55f.zip |
The name (and comment describing) of llvm::GetFirstDebuigLocInBasicBlock no longer represents what the function does. Therefore, the function is removed and its functionality is folded into the only place in the code-base where it was being used.
llvm-svn: 159133
Diffstat (limited to 'llvm/lib/Transforms/Utils/SSAUpdater.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SSAUpdater.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SSAUpdater.cpp b/llvm/lib/Transforms/Utils/SSAUpdater.cpp index 184b67f3e63..b3f5289fcda 100644 --- a/llvm/lib/Transforms/Utils/SSAUpdater.cpp +++ b/llvm/lib/Transforms/Utils/SSAUpdater.cpp @@ -190,8 +190,11 @@ Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) { return V; } - // Set DebugLoc. - InsertedPHI->setDebugLoc(GetFirstDebugLocInBasicBlock(BB)); + // Set the DebugLoc of the inserted PHI, if available. + DebugLoc DL; + if (const Instruction *I = BB->getFirstNonPHI()) + DL = I->getDebugLoc(); + InsertedPHI->setDebugLoc(DL); // If the client wants to know about all new instructions, tell it. if (InsertedPHIs) InsertedPHIs->push_back(InsertedPHI); |