diff --git a/llvm/tools/opt/AnalysisWrappers.cpp b/llvm/tools/opt/AnalysisWrappers.cpp index 18360f837e93..f548d007d78e 100644 --- a/llvm/tools/opt/AnalysisWrappers.cpp +++ b/llvm/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 using namespace llvm; namespace { diff --git a/llvm/tools/opt/GraphPrinters.cpp b/llvm/tools/opt/GraphPrinters.cpp index bbf8d122e7c7..86f99324b953 100644 --- a/llvm/tools/opt/GraphPrinters.cpp +++ b/llvm/tools/opt/GraphPrinters.cpp @@ -19,12 +19,11 @@ #include "llvm/Value.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/Dominators.h" -#include -#include +#include "llvm/Support/raw_ostream.h" using namespace llvm; template -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()); + WriteGraphToFile(llvm::errs(), "callgraph", &getAnalysis()); return false; } diff --git a/llvm/utils/fpcmp/fpcmp.cpp b/llvm/utils/fpcmp/fpcmp.cpp index 66d8ab159b93..5f6b5e8d6e59 100644 --- a/llvm/utils/fpcmp/fpcmp.cpp +++ b/llvm/utils/fpcmp/fpcmp.cpp @@ -14,7 +14,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileUtilities.h" -#include +#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; }