diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:21:29 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:21:29 +0000 |
commit | b5ebf15b2b2ce8989caf1a1114b05d80b0f9bd48 (patch) | |
tree | d3bcb286a90fa4c2b441167133b09cf44c1a7f04 /include/llvm/CodeGen/MachineConstantPool.h | |
parent | d4d9ab80b7b23c2f73192319e5582fb6802f5f18 (diff) |
Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r-- | include/llvm/CodeGen/MachineConstantPool.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index f45c8a7a8d..6bb2665985 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -17,6 +17,7 @@ #include "llvm/ADT/FoldingSet.h" #include "llvm/CodeGen/SelectionDAGNodes.h" +#include "llvm/Support/Streams.h" #include <vector> #include <iosfwd> @@ -48,9 +49,17 @@ public: /// print - Implement operator<<... /// + void print(llvm_ostream &O) const { + if (O.stream()) print(*O.stream()); + } virtual void print(std::ostream &O) const = 0; }; +inline llvm_ostream &operator<<(llvm_ostream &OS, + const MachineConstantPoolValue &V) { + V.print(OS); + return OS; +} inline std::ostream &operator<<(std::ostream &OS, const MachineConstantPoolValue &V) { V.print(OS); @@ -134,6 +143,9 @@ public: /// print - Used by the MachineFunction printer to print information about /// constant pool objects. Implemented in MachineFunction.cpp /// + void print(llvm_ostream &OS) const { + if (OS.stream()) print(*OS.stream()); + } void print(std::ostream &OS) const; /// dump - Call print(std::cerr) to be called from the debugger. |