From 05c4f7af3f67d4ee4e2e26d9984bda155caae30c Mon Sep 17 00:00:00 2001 From: Eric Beckmann Date: Tue, 18 Jul 2017 03:37:34 +0000 Subject: [PATCH] Revert "Adding extra test info for llvm-mt." This reverts commit 66093fd60b848572f676023b8387bff69b151511. llvm-svn: 308261 --- tools/llvm-mt/llvm-mt.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/llvm-mt/llvm-mt.cpp b/tools/llvm-mt/llvm-mt.cpp index f92a4ef77ad..8ac64420ee7 100644 --- a/tools/llvm-mt/llvm-mt.cpp +++ b/tools/llvm-mt/llvm-mt.cpp @@ -67,15 +67,27 @@ LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) { exit(1); } -int main(int argc, const char *argv[]) { +int main(int argc, const char **argv) { errs() << "very start\n"; for (int i = 0; i < argc; i++ ) { errs() << argv[i] << "\n"; } + sys::PrintStackTraceOnErrorSignal(argv[0]); + PrettyStackTraceProgram X(argc, argv); + + ExitOnErr.setBanner("llvm-mt: "); + + SmallVector argv_buf; + SpecificBumpPtrAllocator ArgAllocator; + ExitOnErr(errorCodeToError(sys::Process::GetArgumentVector( + argv_buf, makeArrayRef(argv, argc), ArgAllocator))); + + llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. + CvtResOptTable T; unsigned MAI, MAC; - ArrayRef ArgsArr = makeArrayRef(argv + 1, argc); + ArrayRef ArgsArr = makeArrayRef(argv, argc); opt::InputArgList InputArgs = T.ParseArgs(ArgsArr, MAI, MAC); errs() << "after\n";