summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-10-08 19:30:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-10-08 19:30:33 +0000
commita5af410dc55d73a0442e2898403aefc84e17e65d (patch)
tree71047117a6385d3fb5847a6df8171b5f95057452 /clang/tools
parentd57f9ecd4ad0b1dc95c7851dfff6c99895b84d87 (diff)
downloadbcm5719-llvm-a5af410dc55d73a0442e2898403aefc84e17e65d.tar.gz
bcm5719-llvm-a5af410dc55d73a0442e2898403aefc84e17e65d.zip
libclang: Disable LLVM pretty stack trace functionality, which inadvertently
sets up signal handlers it shouldn't when we are being used a shared library. llvm-svn: 116084
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 57367dd1596..1dfabcac657 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -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 @@ static bool EnabledMultithreading;
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();
OpenPOWER on IntegriCloud