summaryrefslogtreecommitdiffstats
path: root/tools/llvm-ranlib/llvm-ranlib.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-14 17:57:32 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-14 17:57:32 +0000
commitcd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch)
treeb21f6de4e08b89bb7931806bab798fc2a5e3a686 /tools/llvm-ranlib/llvm-ranlib.cpp
parent72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff)
downloadFreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip
FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz
Update llvm to r84119.
Diffstat (limited to 'tools/llvm-ranlib/llvm-ranlib.cpp')
-rw-r--r--tools/llvm-ranlib/llvm-ranlib.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/llvm-ranlib/llvm-ranlib.cpp b/tools/llvm-ranlib/llvm-ranlib.cpp
index d9bcc48..dffe3ad 100644
--- a/tools/llvm-ranlib/llvm-ranlib.cpp
+++ b/tools/llvm-ranlib/llvm-ranlib.cpp
@@ -17,6 +17,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PrettyStackTrace.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Signals.h"
#include <iostream>
#include <iomanip>
@@ -48,7 +49,7 @@ int main(int argc, char **argv) {
llvm::sys::PrintStackTraceOnErrorSignal();
llvm::PrettyStackTraceProgram X(argc, argv);
- LLVMContext Context;
+ LLVMContext &Context = getGlobalContext();
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
// Have the command line options parsed and handle things
@@ -87,13 +88,13 @@ int main(int argc, char **argv) {
printSymbolTable(TheArchive);
} catch (const char* msg) {
- std::cerr << argv[0] << ": " << msg << "\n\n";
+ errs() << argv[0] << ": " << msg << "\n\n";
exitCode = 1;
} catch (const std::string& msg) {
- std::cerr << argv[0] << ": " << msg << "\n";
+ errs() << argv[0] << ": " << msg << "\n";
exitCode = 2;
} catch (...) {
- std::cerr << argv[0] << ": An unexpected unknown exception occurred.\n";
+ errs() << argv[0] << ": An unexpected unknown exception occurred.\n";
exitCode = 3;
}
return exitCode;
OpenPOWER on IntegriCloud