mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
Implement operator<< for machine basic blocks to make it easier to dump them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
154e104718
commit
1ccc4684f3
@ -222,6 +222,7 @@ private: // Methods used to maintain doubly linked list of blocks...
|
|||||||
void removePredecessor(MachineBasicBlock *pred);
|
void removePredecessor(MachineBasicBlock *pred);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB);
|
||||||
|
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <iosfwd>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -27,6 +27,10 @@ MachineBasicBlock::~MachineBasicBlock() {
|
|||||||
LeakDetector::removeGarbageObject(this);
|
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
|
// 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
|
// gets the next available unique MBB number. If it is removed from a
|
||||||
|
Loading…
Reference in New Issue
Block a user