Use StringMap instead of std::map<std::string, SDNode*>.
[oota-llvm.git] / include / llvm / CodeGen / SchedGraphCommon.h
index 4f6e2ad32fc819eac117a595f67785cd7078fa5e..514c464dff362e3bd7e0aaddca11cbc5016e4d45 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -16,7 +16,8 @@
 #define LLVM_CODEGEN_SCHEDGRAPHCOMMON_H
 
 #include "llvm/Value.h"
-#include "llvm/ADT/iterator"
+#include "llvm/ADT/iterator.h"
+#include "llvm/Support/Streams.h"
 #include <vector>
 
 namespace llvm {
@@ -70,6 +71,7 @@ public:
 
   // Debugging support
   virtual void print(std::ostream &os) const = 0;
+  void print(std::ostream *os) const { if (os) print(*os); }
 
 protected:
   friend class SchedGraphCommon;
@@ -98,9 +100,6 @@ inline std::ostream &operator<<(std::ostream &os,
   return os;
 }
 
-
-
-
 //
 // SchedGraphEdge - Edge class to represent dependencies
 //
@@ -183,6 +182,7 @@ public:
 public:
   // Debugging support
   void print(std::ostream &os) const;
+  void print(std::ostream *os) const { if (os) print(*os); }
   void dump(int indent=0) const;
 
 private: