diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-04-13 18:26:06 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-04-13 18:26:06 +0000 |
| commit | 197194b6c9829b9cdc5222939dd8cb25af05b3ca (patch) | |
| tree | 385d75220b3266383a2a7f3c3d1467dbca4ca04b /llvm/utils/FileCheck | |
| parent | a4e874c516517a5e479599755734a734faefe128 (diff) | |
| download | bcm5719-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/utils/FileCheck')
| -rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 7274db67c0f..64aa0f27729 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -21,10 +21,9 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/InitLLVM.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Regex.h" -#include "llvm/Support/Signals.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> @@ -1360,8 +1359,7 @@ bool CheckInput(SourceMgr &SM, StringRef Buffer, } int main(int argc, char **argv) { - sys::PrintStackTraceOnErrorSignal(argv[0]); - PrettyStackTraceProgram X(argc, argv); + InitLLVM X(argc, argv); cl::ParseCommandLineOptions(argc, argv); if (!ValidateCheckPrefixes()) { |

