]> granicus.if.org Git - clang/commitdiff
Start making use of "pretty stack dumps" to get
authorChris Lattner <sabre@nondot.org>
Wed, 4 Mar 2009 21:41:39 +0000 (21:41 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Mar 2009 21:41:39 +0000 (21:41 +0000)
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

Driver/clang.cpp

index 87447c41532ee4dbeacb5e7b7c097501adf700f4..5f8bb3618e4d8b341987c8228b5c2b49a7136647 100644 (file)
@@ -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");