diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-11-28 02:07:29 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-11-28 02:07:29 +0000 |
commit | eba4be809086c59d58050f6d2eceb0c029785dff (patch) | |
tree | eaf3eaacb44ef37db720bf71a36bdf96eed8378e /include/llvm/CodeGen | |
parent | 7bb64e8369318c962232e051c0b0b2f434fcecdf (diff) | |
download | external_llvm-eba4be809086c59d58050f6d2eceb0c029785dff.zip external_llvm-eba4be809086c59d58050f6d2eceb0c029785dff.tar.gz external_llvm-eba4be809086c59d58050f6d2eceb0c029785dff.tar.bz2 |
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
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 863d9b5..b4ceb14 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -22,6 +22,7 @@ #define LLVM_CODEGEN_LIVEINTERVAL_H #include "llvm/ADT/SmallVector.h" +#include "llvm/Support/Streams.h" #include <iosfwd> #include <vector> #include <cassert> @@ -252,7 +253,11 @@ namespace llvm { return beginNumber() < other.beginNumber(); } - void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const; + 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 dump() const; private: @@ -262,10 +267,16 @@ namespace llvm { LiveInterval& operator=(const LiveInterval& rhs); // DO NOT IMPLEMENT }; - inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) { + 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) { + llvm_ostream L(OS); + L << LI; + return OS; + } } #endif |