From 9f50ccd1a364b27a2f0e18040c517e95e53794cc Mon Sep 17 00:00:00 2001 From: Filip Pizlo Date: Sun, 3 Nov 2013 00:29:47 +0000 Subject: 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 --- llvm/lib/Support/PrettyStackTrace.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/Support/PrettyStackTrace.cpp') 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 @@ -147,3 +148,7 @@ void PrettyStackTraceProgram::print(raw_ostream &OS) const { OS << ArgV[i] << ' '; OS << '\n'; } + +void LLVMDisablePrettyStackTrace() { + DisablePrettyStackTrace = true; +} -- cgit v1.2.3