#include <iosfwd>
#include <vector>
#include <cassert>
-#include <ostream>
namespace llvm {
class MRegisterInfo;
};
std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
- inline OStream& operator<<(OStream& os, const LiveRange &LR) {
- if (os.stream()) *os.stream() << LR;
- return os;
- }
+ OStream& operator<<(OStream& os, const LiveRange &LR);
inline bool operator<(unsigned V, const LiveRange &LR) {
return V < LR.start;
};
std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB);
-inline OStream& operator<<(OStream &OS, const MachineBasicBlock &MBB){
- if (OS.stream()) *OS.stream() << MBB;
- return OS;
-}
+OStream& operator<<(OStream &OS, const MachineBasicBlock &MBB);
//===--------------------------------------------------------------------===//
// GraphTraits specializations for machine basic block graphs (machine-CFGs)
#include <vector>
#include <cassert>
#include <iosfwd>
-#include <ostream>
namespace llvm {
IsDead = false;
}
- friend OStream& operator<<(OStream& os, const MachineOperand& mop) {
- if (os.stream()) *os.stream() << mop;
- return os;
- }
+ friend OStream& operator<<(OStream& os, const MachineOperand& mop);
friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
friend class MachineInstr;
}
void print(std::ostream &OS, const TargetMachine *TM) const;
void dump() const;
- friend OStream& operator<<(OStream& os, const MachineInstr& minstr){
- if (os.stream()) *os.stream() << minstr;
- return os;
- }
+ friend OStream& operator<<(OStream& os, const MachineInstr& minstr);
friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr);
//===--------------------------------------------------------------------===//
#include "llvm/Target/MRegisterInfo.h"
#include <algorithm>
#include <map>
+#include <ostream>
using namespace llvm;
// An example for liveAt():
void LiveInterval::dump() const {
cerr << *this << "\n";
}
+
+
+OStream& llvm::operator<<(OStream& os, const LiveRange &LR) {
+ if (os.stream()) *os.stream() << LR;
+ return os;
+}
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.
#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
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;
+}
+