forked from OSchip/llvm-project
Implement operator<< for machine basic blocks to make it easier to dump them.
llvm-svn: 31857
This commit is contained in:
parent
7acdc17fe4
commit
ace542fa6c
|
@ -222,6 +222,7 @@ private: // Methods used to maintain doubly linked list of blocks...
|
|||
void removePredecessor(MachineBasicBlock *pred);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB);
|
||||
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "llvm/Support/DataTypes.h"
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ MachineBasicBlock::~MachineBasicBlock() {
|
|||
LeakDetector::removeGarbageObject(this);
|
||||
}
|
||||
|
||||
std::ostream& llvm::operator<<(std::ostream &OS, const MachineBasicBlock &MBB) {
|
||||
MBB.print(OS);
|
||||
return OS;
|
||||
}
|
||||
|
||||
// MBBs start out as #-1. When a MBB is added to a MachineFunction, it
|
||||
// gets the next available unique MBB number. If it is removed from a
|
||||
|
|
Loading…
Reference in New Issue