Changes in directory llvm/include/llvm/CodeGen:
LiveInterval.h updated: 1.27 -> 1.28 MachineBasicBlock.h updated: 1.49 -> 1.50 MachineConstantPool.h updated: 1.22 -> 1.23 MachineInstr.h updated: 1.201 -> 1.202 SchedGraphCommon.h updated: 1.14 -> 1.15 --- Log message: Added a temporary hack to get the llvm-streams to work for future checkins. --- Diffs of the changes: (+54 -6) LiveInterval.h | 8 ++++++-- MachineBasicBlock.h | 9 ++++++++- MachineConstantPool.h | 12 ++++++++++++ MachineInstr.h | 12 ++++++++++++ SchedGraphCommon.h | 19 ++++++++++++++++--- 5 files changed, 54 insertions(+), 6 deletions(-) Index: llvm/include/llvm/CodeGen/LiveInterval.h diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.27 llvm/include/llvm/CodeGen/LiveInterval.h:1.28 --- llvm/include/llvm/CodeGen/LiveInterval.h:1.27 Mon Nov 27 20:07:29 2006 +++ llvm/include/llvm/CodeGen/LiveInterval.h Tue Nov 28 16:21:29 2006 @@ -60,7 +60,12 @@ 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; @@ -273,8 +278,7 @@ } inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) { - llvm_ostream L(OS); - L << LI; + LI.print(OS); return OS; } } Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.49 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.50 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.49 Sat Nov 18 15:48:05 2006 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Tue Nov 28 16:21:29 2006 @@ -17,6 +17,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/ilist" +#include "llvm/Support/Streams.h" namespace llvm { class MachineFunction; @@ -188,6 +189,9 @@ // Debugging methods. void dump() const; + void print(llvm_ostream &OS) const { + if (OS.stream()) print(*OS.stream()); + } void print(std::ostream &OS) const; /// getNumber - MachineBasicBlocks are uniquely numbered at the function @@ -222,7 +226,10 @@ }; std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB); - +inline llvm_ostream& operator<<(llvm_ostream &OS, const MachineBasicBlock &MBB){ + if (OS.stream()) *OS.stream() << MBB; + return OS; +} //===--------------------------------------------------------------------===// // GraphTraits specializations for machine basic block graphs (machine-CFGs) Index: llvm/include/llvm/CodeGen/MachineConstantPool.h diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.22 llvm/include/llvm/CodeGen/MachineConstantPool.h:1.23 --- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.22 Sun Nov 5 13:31:28 2006 +++ llvm/include/llvm/CodeGen/MachineConstantPool.h Tue Nov 28 16:21:29 2006 @@ -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 @@ /// 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 @@ /// 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. Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.201 llvm/include/llvm/CodeGen/MachineInstr.h:1.202 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.201 Mon Nov 27 17:33:29 2006 +++ llvm/include/llvm/CodeGen/MachineInstr.h Tue Nov 28 16:21:29 2006 @@ -18,6 +18,7 @@ #include "llvm/ADT/iterator" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/Streams.h" #include <vector> #include <cassert> #include <iosfwd> @@ -284,6 +285,10 @@ IsDead = false; } + friend llvm_ostream& operator<<(llvm_ostream& os, const MachineOperand& mop) { + if (os.stream()) *os.stream() << mop; + return os; + } friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop); friend class MachineInstr; @@ -400,8 +405,15 @@ // // Debugging support // + void print(llvm_ostream &OS, const TargetMachine *TM) const { + if (OS.stream()) print(*OS.stream(), TM); + } void print(std::ostream &OS, const TargetMachine *TM) const; void dump() const; + friend llvm_ostream& operator<<(llvm_ostream& os, const MachineInstr& minstr){ + if (os.stream()) *os.stream() << minstr; + return os; + } friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr); //===--------------------------------------------------------------------===// Index: llvm/include/llvm/CodeGen/SchedGraphCommon.h diff -u llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.14 llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.15 --- llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.14 Thu Apr 21 22:45:18 2005 +++ llvm/include/llvm/CodeGen/SchedGraphCommon.h Tue Nov 28 16:21:29 2006 @@ -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 @@ 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 @@ }; // 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: // 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 @@ }; // 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; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits