diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-30 16:33:32 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-30 16:33:32 +0000 |
| commit | 51315c45ff5643a27f9c84b816db54ee870ba29b (patch) | |
| tree | 1d87443fa0e53d3e6b315ce25787e64be0906bf7 /contrib/llvm/lib/Support/PrettyStackTrace.cpp | |
| parent | 6dfd050075216be8538ae375a22d30db72916f7e (diff) | |
| parent | eb11fae6d08f479c0799db45860a98af528fa6e7 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Support/PrettyStackTrace.cpp')
| -rw-r--r-- | contrib/llvm/lib/Support/PrettyStackTrace.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Support/PrettyStackTrace.cpp b/contrib/llvm/lib/Support/PrettyStackTrace.cpp index a18e9cc50040..f5b6e6f3652d 100644 --- a/contrib/llvm/lib/Support/PrettyStackTrace.cpp +++ b/contrib/llvm/lib/Support/PrettyStackTrace.cpp @@ -88,7 +88,11 @@ extern "C" { CRASH_REPORTER_CLIENT_HIDDEN struct crashreporter_annotations_t gCRAnnotations __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION))) +#if CRASHREPORTER_ANNOTATIONS_VERSION < 5 = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0, 0, 0 }; +#else + = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0, 0, 0, 0, 0 }; +#endif } #elif defined(__APPLE__) && HAVE_CRASHREPORTER_INFO extern "C" const char *__crashreporter_info__ @@ -114,9 +118,9 @@ static void CrashHandler(void *) { if (!TmpStr.empty()) { #ifdef HAVE_CRASHREPORTERCLIENT_H // Cast to void to avoid warning. - (void)CRSetCrashLogMessage(std::string(TmpStr.str()).c_str()); + (void)CRSetCrashLogMessage(TmpStr.c_str()); #elif HAVE_CRASHREPORTER_INFO - __crashreporter_info__ = strdup(std::string(TmpStr.str()).c_str()); + __crashreporter_info__ = strdup(TmpStr.c_str()); #endif errs() << TmpStr.str(); } |
