projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary uses of <iostream>.
[oota-llvm.git]
/
tools
/
opt
/
GraphPrinters.cpp
diff --git
a/tools/opt/GraphPrinters.cpp
b/tools/opt/GraphPrinters.cpp
index bbf8d122e7c7ef01c524010f56fe000b5b76438b..86f99324b953a15c8687ca6388b021ba37cd687a 100644
(file)
--- 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 "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>
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 << "'...";
const GraphType >) {
std::string Filename = GraphName + ".dot";
O << "Writing '" << Filename << "'...";
@@
-69,7
+68,7
@@
namespace {
CallGraphPrinter() : ModulePass(&ID) {}
virtual bool runOnModule(Module &M) {
CallGraphPrinter() : ModulePass(&ID) {}
virtual bool runOnModule(Module &M) {
- WriteGraphToFile(
std::cerr
, "callgraph", &getAnalysis<CallGraph>());
+ WriteGraphToFile(
llvm::errs()
, "callgraph", &getAnalysis<CallGraph>());
return false;
}
return false;
}