diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/opt/AnalysisWrappers.cpp | 1 | ||||
-rw-r--r-- | tools/opt/GraphPrinters.cpp | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tools/opt/AnalysisWrappers.cpp b/tools/opt/AnalysisWrappers.cpp index 18360f8..f548d00 100644 --- a/tools/opt/AnalysisWrappers.cpp +++ b/tools/opt/AnalysisWrappers.cpp @@ -22,7 +22,6 @@ #include "llvm/Support/CallSite.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Support/raw_ostream.h" -#include <iostream> using namespace llvm; namespace { diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index bbf8d12..86f9932 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -19,12 +19,11 @@ #include "llvm/Value.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/Dominators.h" -#include <iostream> -#include <fstream> +#include "llvm/Support/raw_ostream.h" using namespace llvm; template<typename GraphType> -static void WriteGraphToFile(std::ostream &O, const std::string &GraphName, +static void WriteGraphToFile(raw_ostream &O, const std::string &GraphName, const GraphType >) { std::string Filename = GraphName + ".dot"; O << "Writing '" << Filename << "'..."; @@ -69,7 +68,7 @@ namespace { CallGraphPrinter() : ModulePass(&ID) {} virtual bool runOnModule(Module &M) { - WriteGraphToFile(std::cerr, "callgraph", &getAnalysis<CallGraph>()); + WriteGraphToFile(llvm::errs(), "callgraph", &getAnalysis<CallGraph>()); return false; } |