From 65f57c233cd4499e2e8b52a503201e64edfd6a9e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 15 Jul 2009 16:35:29 +0000 Subject: Use errs() instead of std::cerr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-nm/llvm-nm.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tools/llvm-nm') diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 4e01180..5646835 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -24,6 +24,7 @@ #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/System/Signals.h" #include #include @@ -147,7 +148,7 @@ static void DumpSymbolNamesFromFile(std::string &Filename) { if (Result) DumpSymbolNamesFromModule(Result); else { - std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; + errs() << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; return; } @@ -156,17 +157,17 @@ static void DumpSymbolNamesFromFile(std::string &Filename) { Archive* archive = Archive::OpenAndLoad(sys::Path(Filename), Context, &ErrorMessage); if (!archive) - std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; + errs() << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; std::vector Modules; if (archive->getAllModules(Modules, &ErrorMessage)) { - std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; + errs() << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; return; } MultipleFiles = true; std::for_each (Modules.begin(), Modules.end(), DumpSymbolNamesFromModule); } else { - std::cerr << ToolName << ": " << Filename << ": " - << "unrecognizable file type\n"; + errs() << ToolName << ": " << Filename << ": " + << "unrecognizable file type\n"; return; } } -- cgit v1.1