llvm.org GIT mirror llvm / eba4be8
Added helper function to transition to using llvm streams. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31953 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 13 years ago
1 changed file(s) with 13 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2121 #define LLVM_CODEGEN_LIVEINTERVAL_H
2222
2323 #include "llvm/ADT/SmallVector.h"
24 #include "llvm/Support/Streams.h"
2425 #include
2526 #include
2627 #include
251252 return beginNumber() < other.beginNumber();
252253 }
253254
254 void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const;
255 void print(llvm_ostream &OS, const MRegisterInfo *MRI = 0) const;
256 void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const {
257 llvm_ostream L(OS);
258 L << MRI;
259 }
255260 void dump() const;
256261
257262 private:
261266 LiveInterval& operator=(const LiveInterval& rhs); // DO NOT IMPLEMENT
262267 };
263268
264 inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
269 inline llvm_ostream &operator<<(llvm_ostream &OS, const LiveInterval &LI) {
265270 LI.print(OS);
266271 return OS;
267272 }
273
274 inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
275 llvm_ostream L(OS);
276 L << LI;
277 return OS;
278 }
268279 }
269280
270281 #endif