summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/llvm-size/llvm-size.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/llvm-size/llvm-size.cpp')
-rw-r--r--gnu/llvm/tools/llvm-size/llvm-size.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/gnu/llvm/tools/llvm-size/llvm-size.cpp b/gnu/llvm/tools/llvm-size/llvm-size.cpp
index cf35a5795e7..67c81ec9e7c 100644
--- a/gnu/llvm/tools/llvm-size/llvm-size.cpp
+++ b/gnu/llvm/tools/llvm-size/llvm-size.cpp
@@ -23,10 +23,8 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/PrettyStackTrace.h"
-#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
@@ -70,7 +68,7 @@ cl::opt<bool>
static cl::list<std::string>
ArchFlags("arch", cl::desc("architecture(s) from a Mach-O file to dump"),
cl::ZeroOrMore);
-bool ArchAll = false;
+static bool ArchAll = false;
enum RadixTy { octal = 8, decimal = 10, hexadecimal = 16 };
static cl::opt<unsigned int>
@@ -95,7 +93,7 @@ static cl::alias TotalSizesShort("t", cl::desc("Short for --totals"),
static cl::list<std::string>
InputFilenames(cl::Positional, cl::desc("<input files>"), cl::ZeroOrMore);
-bool HadError = false;
+static bool HadError = false;
static std::string ToolName;
@@ -854,11 +852,7 @@ static void printBerkelyTotals() {
}
int main(int argc, char **argv) {
- // Print a stack trace if we signal out.
- sys::PrintStackTraceOnErrorSignal(argv[0]);
- PrettyStackTraceProgram X(argc, argv);
-
- llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
+ InitLLVM X(argc, argv);
cl::ParseCommandLineOptions(argc, argv, "llvm object size dumper\n");
ToolName = argv[0];