From ace542fa6cdd3dbafbc1e06a5d7b7ccf0fc17eba Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 18 Nov 2006 21:47:36 +0000 Subject: Implement operator<< for machine basic blocks to make it easier to dump them. llvm-svn: 31857 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index fcc01299cd8a..201b79e13002 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -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 -- cgit v1.2.3