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/SchedGraphCommon.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/SchedGraphCommon.h')
-rw-r--r-- | include/llvm/CodeGen/SchedGraphCommon.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SchedGraphCommon.h b/include/llvm/CodeGen/SchedGraphCommon.h index 4f6e2ad32f..b4cee969e1 100644 --- a/include/llvm/CodeGen/SchedGraphCommon.h +++ b/include/llvm/CodeGen/SchedGraphCommon.h @@ -17,6 +17,7 @@ #include "llvm/Value.h" #include "llvm/ADT/iterator" +#include "llvm/Support/Streams.h" #include <vector> namespace llvm { @@ -69,6 +70,9 @@ public: void dump(int indent=0) const; // Debugging support + void print(llvm_ostream &os) const { + if (os.stream()) print(*os.stream()); + } virtual void print(std::ostream &os) const = 0; protected: @@ -92,15 +96,17 @@ protected: }; // ostream << operator for SchedGraphNode class +inline llvm_ostream &operator<<(llvm_ostream &os, + const SchedGraphNodeCommon &node) { + node.print(os); + return os; +} inline std::ostream &operator<<(std::ostream &os, const SchedGraphNodeCommon &node) { node.print(os); return os; } - - - // // SchedGraphEdge - Edge class to represent dependencies // @@ -182,6 +188,9 @@ public: public: // Debugging support + void print(llvm_ostream &os) const { + if (os.stream()) print(*os.stream()); + } void print(std::ostream &os) const; void dump(int indent=0) const; @@ -191,6 +200,10 @@ private: }; // ostream << operator for SchedGraphNode class +inline llvm_ostream &operator<<(llvm_ostream &os, const SchedGraphEdge &edge) { + edge.print(os); + return os; +} inline std::ostream &operator<<(std::ostream &os, const SchedGraphEdge &edge) { edge.print(os); return os; |