1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane.

llvm-svn: 89130
This commit is contained in:
Evan Cheng 2009-11-17 19:19:59 +00:00
parent e1439535ac
commit 4ec2795a0c
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); 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) // GraphTraits specializations for machine basic block graphs (machine-CFGs)
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//

View File

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

View File

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