diff options
author | Filip Pizlo <fpizlo@apple.com> | 2013-11-03 00:29:47 +0000 |
---|---|---|
committer | Filip Pizlo <fpizlo@apple.com> | 2013-11-03 00:29:47 +0000 |
commit | 9f50ccd1a364b27a2f0e18040c517e95e53794cc (patch) | |
tree | b572f32afab46d20f3c64b954cc1c68a71f36ba1 /llvm/lib/Support/PrettyStackTrace.cpp | |
parent | f1b0baeb21d1f3dd9f08c9f2337729843672f4ac (diff) | |
download | bcm5719-llvm-9f50ccd1a364b27a2f0e18040c517e95e53794cc.tar.gz bcm5719-llvm-9f50ccd1a364b27a2f0e18040c517e95e53794cc.zip |
When LLVM is embedded in a larger application, it's not OK for LLVM to intercept crashes. LLVM already has
the ability to disable this functionality. This patch exposes it via the C API.
llvm-svn: 193937
Diffstat (limited to 'llvm/lib/Support/PrettyStackTrace.cpp')
-rw-r--r-- | llvm/lib/Support/PrettyStackTrace.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/PrettyStackTrace.cpp b/llvm/lib/Support/PrettyStackTrace.cpp index 315008ae810..d08abc8ce15 100644 --- a/llvm/lib/Support/PrettyStackTrace.cpp +++ b/llvm/lib/Support/PrettyStackTrace.cpp @@ -20,6 +20,7 @@ #include "llvm/Support/ThreadLocal.h" #include "llvm/Support/Watchdog.h" #include "llvm/Support/raw_ostream.h" +#include "llvm-c/Core.h" #ifdef HAVE_CRASHREPORTERCLIENT_H #include <CrashReporterClient.h> @@ -147,3 +148,7 @@ void PrettyStackTraceProgram::print(raw_ostream &OS) const { OS << ArgV[i] << ' '; OS << '\n'; } + +void LLVMDisablePrettyStackTrace() { + DisablePrettyStackTrace = true; +} |