summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/bugpoint.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2018-04-13 18:26:06 +0000
committerRui Ueyama <ruiu@google.com>2018-04-13 18:26:06 +0000
commit197194b6c9829b9cdc5222939dd8cb25af05b3ca (patch)
tree385d75220b3266383a2a7f3c3d1467dbca4ca04b /llvm/tools/bugpoint/bugpoint.cpp
parenta4e874c516517a5e479599755734a734faefe128 (diff)
downloadbcm5719-llvm-197194b6c9829b9cdc5222939dd8cb25af05b3ca.tar.gz
bcm5719-llvm-197194b6c9829b9cdc5222939dd8cb25af05b3ca.zip
Define InitLLVM to do common initialization all at once.
We have a few functions that virtually all command wants to run on process startup/shutdown. This patch adds InitLLVM class to do that all at once, so that we don't need to copy-n-paste boilerplate code to each llvm command's main() function. Differential Revision: https://reviews.llvm.org/D45602 llvm-svn: 330046
Diffstat (limited to 'llvm/tools/bugpoint/bugpoint.cpp')
-rw-r--r--llvm/tools/bugpoint/bugpoint.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index ec1ca2e5496..d989a3ee2d7 100644
--- a/llvm/tools/bugpoint/bugpoint.cpp
+++ b/llvm/tools/bugpoint/bugpoint.cpp
@@ -21,11 +21,11 @@
#include "llvm/LinkAllIR.h"
#include "llvm/LinkAllPasses.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PluginLoader.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Process.h"
-#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/Valgrind.h"
#include "llvm/Transforms/IPO/AlwaysInliner.h"
@@ -117,9 +117,7 @@ void initializePollyPasses(llvm::PassRegistry &Registry);
int main(int argc, char **argv) {
#ifndef DEBUG_BUGPOINT
- llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
- llvm::PrettyStackTraceProgram X(argc, argv);
- llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
+ InitLLVM X(argc, argv);
#endif
// Initialize passes
OpenPOWER on IntegriCloud