[llvm-branch-commits] [cfe-branch] r116085 - /cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp

Daniel Dunbar daniel at zuster.org
Fri Oct 8 12:31:21 PDT 2010


Author: ddunbar
Date: Fri Oct  8 14:31:21 2010
New Revision: 116085

URL: http://llvm.org/viewvc/llvm-project?rev=116085&view=rev
Log:
Merge r116084:
--
Author: Daniel Dunbar <daniel at zuster.org>
Date:   Fri Oct 8 19:30:33 2010 +0000

    libclang: Disable LLVM pretty stack trace functionality, which inadvertently
    sets up signal handlers it shouldn't when we are being used a shared library.

Modified:
    cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp

Modified: cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp?rev=116085&r1=116084&r2=116085&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Fri Oct  8 14:31:21 2010
@@ -32,6 +32,7 @@
 #include "clang/Lex/Preprocessor.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/CrashRecoveryContext.h"
+#include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Timer.h"
@@ -1919,6 +1920,10 @@
 extern "C" {
 CXIndex clang_createIndex(int excludeDeclarationsFromPCH,
                           int displayDiagnostics) {
+  // Disable pretty stack trace functionality, which will otherwise be a very
+  // poor citizen of the world and set up all sorts of signal handlers.
+  llvm::DisablePrettyStackTrace = true;
+
   // We use crash recovery to make some of our APIs more reliable, implicitly
   // enable it.
   llvm::CrashRecoveryContext::Enable();





More information about the llvm-branch-commits mailing list