Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2009-11-17 19:19:59 +00:00
parent 7adcdc313f
commit 2a085c3493
3 changed files with 7 additions and 2 deletions

View File

@ -358,6 +358,8 @@ private: // Methods used to maintain doubly linked list of blocks...
raw_ostream& operator<<(raw_ostream &OS, const MachineBasicBlock &MBB);
void WriteAsOperand(raw_ostream &, const MachineBasicBlock*, bool t);
//===--------------------------------------------------------------------===//
// GraphTraits specializations for machine basic block graphs (machine-CFGs)
//===--------------------------------------------------------------------===//

View File

@ -23,8 +23,6 @@
namespace llvm {
inline void WriteAsOperand(raw_ostream &, const MachineBasicBlock*, bool t) { }
template<>
inline void DominatorTreeBase<MachineBasicBlock>::addRoot(MachineBasicBlock* MBB) {
this->Roots.push_back(MBB);

View File

@ -447,3 +447,8 @@ bool MachineBasicBlock::CorrectExtraCFGEdges(MachineBasicBlock *DestA,
}
return MadeChange;
}
void llvm::WriteAsOperand(raw_ostream &OS, const MachineBasicBlock *MBB,
bool t) {
OS << "BB#" << MBB->getNumber();
}