Remove unnecessary uses of <iostream>.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 15 Apr 2010 03:47:24 +0000 (03:47 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 15 Apr 2010 03:47:24 +0000 (03:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/AnalysisWrappers.cpp
tools/opt/GraphPrinters.cpp
utils/fpcmp/fpcmp.cpp

index 18360f837e93a40cb12c57f548bac8423a48df80..f548d007d78ede72d0f287908d24080bbf0b68a8 100644 (file)
@@ -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 {
index bbf8d122e7c7ef01c524010f56fe000b5b76438b..86f99324b953a15c8687ca6388b021ba37cd687a 100644 (file)
 #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;
     }
 
index 66d8ab159b931dabe35e749585987e57838a175f..5f6b5e8d6e59bfea15fc1377424ec759b8dd39a4 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FileUtilities.h"
-#include <iostream>
+#include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
 namespace {
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
                                   sys::PathWithStatus(File2),
                                   AbsTolerance, RelTolerance, &ErrorMsg);
   if (!ErrorMsg.empty())
-    std::cerr << argv[0] << ": " << ErrorMsg << "\n";
+    errs() << argv[0] << ": " << ErrorMsg << "\n";
   return DF;
 }