aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h1
-rw-r--r--include/llvm/CodeGen/MachineInstr.h1
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp4
3 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 85d348337a..1196f2126b 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -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);
//===--------------------------------------------------------------------===//
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index b967a1fcb3..907985877f 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -20,6 +20,7 @@
#include "llvm/Support/DataTypes.h"
#include <vector>
#include <cassert>
+#include <iosfwd>
namespace llvm {
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index fcc01299cd..201b79e130 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/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