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;
+ void print(std::ostream *os) const { if (os) print(*os); }
protected:
friend class SchedGraphCommon;
};
// 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);
public:
// Debugging support
- void print(llvm_ostream &os) const {
- if (os.stream()) print(*os.stream());
- }
void print(std::ostream &os) const;
+ void print(std::ostream *os) const { if (os) print(*os); }
void dump(int indent=0) const;
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;