}
void dump() const;
+ void print(std::ostream &os) const;
+ void print(std::ostream *os) const { if (os) print(*os); }
private:
LiveRange(); // DO NOT IMPLEMENT
};
std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
- inline llvm_ostream& operator<<(llvm_ostream& os, const LiveRange &LR) {
- if (os.stream()) *os.stream() << LR;
- return os;
- }
+
inline bool operator<(unsigned V, const LiveRange &LR) {
return V < LR.start;
return beginNumber() < other.beginNumber();
}
- void print(llvm_ostream &OS, const MRegisterInfo *MRI = 0) const;
- void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const {
- llvm_ostream L(OS);
- L << MRI;
+ void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const;
+ void print(std::ostream *OS, const MRegisterInfo *MRI = 0) const {
+ if (OS) print(*OS, MRI);
}
void dump() const;
LiveInterval& operator=(const LiveInterval& rhs); // DO NOT IMPLEMENT
};
- inline llvm_ostream &operator<<(llvm_ostream &OS, const LiveInterval &LI) {
- LI.print(OS);
- return OS;
- }
-
inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
LI.print(OS);
return OS;