Replacing std::iostreams with llvm iostreams. Some of these changes involve
[oota-llvm.git] / lib / Analysis / DataStructure / Steensgaard.cpp
index eb5b74ca0227e10704b24538afdecf3c39a9d685..292dfffa0dcb3dcb83d12c8e48d2624231cd21b9 100644 (file)
@@ -20,7 +20,7 @@
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Module.h"
 #include "llvm/Support/Debug.h"
-#include <iostream>
+#include <ostream>
 using namespace llvm;
 
 namespace {
@@ -53,6 +53,9 @@ namespace {
     }
 
     // print - Implement the Pass::print method...
+    void print(llvm_ostream O, const Module *M) const {
+      if (O.stream()) print(*O.stream(), M);
+    }
     void print(std::ostream &O, const Module *M) const {
       assert(ResultGraph && "Result graph has not yet been computed!");
       ResultGraph->writeGraphToFile(O, "steensgaards");
@@ -188,7 +191,7 @@ bool Steens::runOnModule(Module &M) {
   // FIXME: We should be able to disable the globals graph for steens!
   //ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
 
-  DEBUG(print(std::cerr, &M));
+  print(DOUT, &M);
   return false;
 }