#include "llvm/Analysis/Passes.h"
#include "llvm/Module.h"
#include "llvm/Support/Debug.h"
-#include <iostream>
+#include <ostream>
using namespace llvm;
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");
// 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;
}