summaryrefslogtreecommitdiffstats
path: root/tools/driver
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-06-09 00:53:41 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-06-09 00:53:41 +0000
commit094ed6b13012a95af62f87677ed47b5b9714106c (patch)
tree1c4cece3991f07b48354c79583e41c6cc64e6211 /tools/driver
parent8992cdfa97a0ea84e754f778d1392d390058d8c7 (diff)
Update to match LLVM r272232.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r--tools/driver/cc1_main.cpp4
-rw-r--r--tools/driver/cc1as_main.cpp7
-rw-r--r--tools/driver/driver.cpp5
3 files changed, 2 insertions, 14 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
index 8240561236..df315b8c0a 100644
--- a/tools/driver/cc1_main.cpp
+++ b/tools/driver/cc1_main.cpp
@@ -132,9 +132,5 @@ int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
return !Success;
}
- // Managed static deconstruction. Useful for making things like
- // -time-passes usable.
- llvm::llvm_shutdown();
-
return !Success;
}
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp
index 1c032c09ef..2d17be99e2 100644
--- a/tools/driver/cc1as_main.cpp
+++ b/tools/driver/cc1as_main.cpp
@@ -43,10 +43,8 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Host.h"
-#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
@@ -450,11 +448,6 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message,
}
int cc1as_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {
- // Print a stack trace if we signal out.
- sys::PrintStackTraceOnErrorSignal();
- PrettyStackTraceProgram X(Argv.size(), Argv.data());
- llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
-
// Initialize targets and assembly printers/parsers.
InitializeAllTargetInfos();
InitializeAllTargetMCs();
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index b74de08199..4d69aaffba 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -308,8 +308,9 @@ static int ExecuteCC1Tool(ArrayRef<const char *> argv, StringRef Tool) {
}
int main(int argc_, const char **argv_) {
- llvm::sys::PrintStackTraceOnErrorSignal();
+ llvm::sys::PrintStackTraceOnErrorSignal(argv_[0]);
llvm::PrettyStackTraceProgram X(argc_, argv_);
+ llvm::llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
if (llvm::sys::Process::FixupStandardFileDescriptors())
return 1;
@@ -497,8 +498,6 @@ int main(int argc_, const char **argv_) {
// results now. This happens in -disable-free mode.
llvm::TimerGroup::printAll(llvm::errs());
- llvm::llvm_shutdown();
-
#ifdef LLVM_ON_WIN32
// Exit status should not be negative on Win32, unless abnormal termination.
// Once abnormal termiation was caught, negative status should not be