mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
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:
@ -538,3 +538,15 @@ ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
|
||||
UncondBranch->eraseFromParent();
|
||||
return cast<ReturnInst>(NewRet);
|
||||
}
|
||||
|
||||
/// GetFirstDebugLocInBasicBlock - Return first valid DebugLoc entry in a
|
||||
/// given basic block.
|
||||
DebugLoc llvm::GetFirstDebugLocInBasicBlock(const BasicBlock *BB) {
|
||||
for (BasicBlock::const_iterator BI = BB->begin(), BE = BB->end();
|
||||
BI != BE; ++BI) {
|
||||
DebugLoc DL = BI->getDebugLoc();
|
||||
if (!DL.isUnknown())
|
||||
return DL;
|
||||
}
|
||||
return DebugLoc();
|
||||
}
|
||||
|
Reference in New Issue
Block a user