diff options
| author | Eric Christopher <echristo@apple.com> | 2010-06-22 21:01:04 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@apple.com> | 2010-06-22 21:01:04 +0000 |
| commit | 189486d9303f1d48fe37ca5ffdc2fc6b90b41ce0 (patch) | |
| tree | eca3923eedcb512a7e58d801803b21c5bef4ff58 /lib/Support | |
| parent | 9bd152f95118e07b2a3717ab36e204dc5e4e3b3b (diff) | |
| download | external_llvm-189486d9303f1d48fe37ca5ffdc2fc6b90b41ce0.zip external_llvm-189486d9303f1d48fe37ca5ffdc2fc6b90b41ce0.tar.gz external_llvm-189486d9303f1d48fe37ca5ffdc2fc6b90b41ce0.tar.bz2 | |
Look for and use a different darwin crash reporter library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
| -rw-r--r-- | lib/Support/PrettyStackTrace.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp index 7a04a53..e01c491 100644 --- a/lib/Support/PrettyStackTrace.cpp +++ b/lib/Support/PrettyStackTrace.cpp @@ -12,11 +12,17 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Config/config.h" // Get autoconf configuration settings #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" #include "llvm/System/Signals.h" #include "llvm/System/ThreadLocal.h" #include "llvm/ADT/SmallString.h" + +#ifdef HAVE_CRASHREPORTERCLIENT_H +#include <CrashReporterClient.h> +#endif + using namespace llvm; namespace llvm { @@ -49,7 +55,7 @@ static void PrintCurStackTrace(raw_ostream &OS) { } // Integrate with crash reporter. -#ifdef __APPLE__ +#if defined (__APPLE__) && !defined (HAVE_CRASHREPORTERCLIENT_H) static const char *__crashreporter_info__ = 0; asm(".desc ___crashreporter_info__, 0x10"); #endif @@ -71,7 +77,11 @@ static void CrashHandler(void *Cookie) { } if (!TmpStr.empty()) { +#ifndef HAVE_CRASHREPORTERCLIENT_H __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str()); +#else + CRSetCrashLogMessage(std::string(TmpStr.str()).c_str()); +#endif errs() << TmpStr.str(); } |
