aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-15 16:35:29 +0000
committerDan Gohman <gohman@apple.com>2009-07-15 16:35:29 +0000
commit65f57c233cd4499e2e8b52a503201e64edfd6a9e (patch)
treeaf96a9f73e7b0060483af26b6f3e1a6210677b67 /tools/llvm-nm
parent6ca5f9360ce657c1ab382605536751d33c1d138a (diff)
downloadexternal_llvm-65f57c233cd4499e2e8b52a503201e64edfd6a9e.zip
external_llvm-65f57c233cd4499e2e8b52a503201e64edfd6a9e.tar.gz
external_llvm-65f57c233cd4499e2e8b52a503201e64edfd6a9e.tar.bz2
Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp11
1 files changed, 6 insertions, 5 deletions
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 <algorithm>
#include <cctype>
@@ -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<Module *> 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;
}
}