aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2006-12-15 22:57:14 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2006-12-15 22:57:14 +0000
commitc21c5eeb4f56f160e79522df2d3aab5cfe73c05d (patch)
treeb349cac9dfc28354762c66ad227c0ae9e496748a /lib/CodeGen
parent19103b11ecbd5153537a1c64ffefa922fe591add (diff)
downloadexternal_llvm-c21c5eeb4f56f160e79522df2d3aab5cfe73c05d.tar.gz
external_llvm-c21c5eeb4f56f160e79522df2d3aab5cfe73c05d.tar.bz2
external_llvm-c21c5eeb4f56f160e79522df2d3aab5cfe73c05d.zip
An even better unbreakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/LiveInterval.cpp7
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp5
-rw-r--r--lib/CodeGen/MachineInstr.cpp12
3 files changed, 24 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index e2a3bbaaf0..78c874cbb9 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -24,6 +24,7 @@
#include "llvm/Target/MRegisterInfo.h"
#include <algorithm>
#include <map>
+#include <ostream>
using namespace llvm;
// An example for liveAt():
@@ -509,3 +510,9 @@ void LiveInterval::print(OStream OS, const MRegisterInfo *MRI) const {
void LiveInterval::dump() const {
cerr << *this << "\n";
}
+
+
+OStream& llvm::operator<<(OStream& os, const LiveRange &LR) {
+ if (os.stream()) *os.stream() << LR;
+ return os;
+}
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index a626f4fdd1..39b142a2f3 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/lib/CodeGen/MachineBasicBlock.cpp
@@ -31,6 +31,11 @@ std::ostream& llvm::operator<<(std::ostream &OS, const MachineBasicBlock &MBB) {
return OS;
}
+OStream& llvm::operator<<(OStream &OS, const MachineBasicBlock &MBB) {
+ if (OS.stream()) *OS.stream() << MBB;
+ 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
// MachineFunction, it goes back to being #-1.
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 716b40fbf1..a68442511b 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -18,6 +18,7 @@
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Support/LeakDetector.h"
#include "llvm/Support/Streams.h"
+#include <ostream>
using namespace llvm;
/// MachineInstr ctor - This constructor creates a dummy MachineInstr with
@@ -363,3 +364,14 @@ std::ostream &llvm::operator<<(std::ostream &OS, const MachineOperand &MO) {
return OS;
}
+
+OStream& llvm::operator<<(OStream& os, const MachineInstr& minstr) {
+ if (os.stream()) *os.stream() << minstr;
+ return os;
+}
+
+OStream& llvm::operator<<(OStream& os, const MachineOperand& mop) {
+ if (os.stream()) *os.stream() << mop;
+ return os;
+}
+