summaryrefslogtreecommitdiff
path: root/tools/opt/GraphPrinters.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-04-15 03:47:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-04-15 03:47:24 +0000
commit8f10915145c77a807f620b0c9ccc86de53702f2c (patch)
treec5c5dfa491417321bfa9f4c117c0e066dd96c8d3 /tools/opt/GraphPrinters.cpp
parent4c7276a4eb64199e1804818a7650e4a3c5c662dc (diff)
downloadllvm-8f10915145c77a807f620b0c9ccc86de53702f2c.tar.gz
llvm-8f10915145c77a807f620b0c9ccc86de53702f2c.tar.bz2
llvm-8f10915145c77a807f620b0c9ccc86de53702f2c.tar.xz
Remove unnecessary uses of <iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/GraphPrinters.cpp')
-rw-r--r--tools/opt/GraphPrinters.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp
index bbf8d122e7..86f99324b9 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 &GT) {
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;
}