mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Fix debug code that assumes getBasicBlock never returns NULL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -172,6 +172,13 @@ static inline void OutputReg(raw_ostream &os, unsigned RegNo,
|
||||
os << " %reg" << RegNo;
|
||||
}
|
||||
|
||||
StringRef MachineBasicBlock::getName() const {
|
||||
if (const BasicBlock *LBB = getBasicBlock())
|
||||
return LBB->getName();
|
||||
else
|
||||
return "(null)";
|
||||
}
|
||||
|
||||
void MachineBasicBlock::print(raw_ostream &OS) const {
|
||||
const MachineFunction *MF = getParent();
|
||||
if (!MF) {
|
||||
|
||||
Reference in New Issue
Block a user