aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-04 21:41:39 +0000
committerChris Lattner <sabre@nondot.org>2009-03-04 21:41:39 +0000
commit09e94a35925a3b4fccceb405df07ee1153d5cf29 (patch)
treeaea44027cbc8a07657c91eed0d5b50a88ed862c0 /Driver/clang.cpp
parentf63aea331f42dcd7118f4a3e3d8325a9ce742857 (diff)
Start making use of "pretty stack dumps" to get
better crash info when clang crashes. Step #2 of many. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 87447c4153..5f8bb3618e 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -50,6 +50,7 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/PluginLoader.h"
+#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Timer.h"
#include "llvm/System/Host.h"
#include "llvm/System/Path.h"
@@ -1561,6 +1562,7 @@ static bool isSerializedFile(const std::string& InFile) {
int main(int argc, char **argv) {
llvm::cl::ParseCommandLineOptions(argc, argv, " llvm clang cfe\n");
llvm::sys::PrintStackTraceOnErrorSignal();
+ llvm::PrettyStackTraceProgram X(argc, argv);
if (TimeReport)
ClangFrontendTimer = new llvm::Timer("Clang front-end time");