diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:32:43 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:32:43 +0000 | 
| commit | b7eb8e35e481a74962664b63dfb09483b200209a (patch) | |
| tree | 1937fb4a348458ce2d02ade03ac3bb0aa18d2fcd /lib/Support/PrettyStackTrace.cpp | |
| parent | eb11fae6d08f479c0799db45860a98af528fa6e7 (diff) | |
Notes
Diffstat (limited to 'lib/Support/PrettyStackTrace.cpp')
| -rw-r--r-- | lib/Support/PrettyStackTrace.cpp | 20 | 
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp index f5b6e6f3652d6..206de91ae2393 100644 --- a/lib/Support/PrettyStackTrace.cpp +++ b/lib/Support/PrettyStackTrace.cpp @@ -1,10 +1,10 @@  //===- PrettyStackTrace.cpp - Pretty Crash Handling -----------------------===// -//  +//  //                     The LLVM Compiler Infrastructure  //  // This file is distributed under the University of Illinois Open Source  // License. See LICENSE.TXT for details. -//  +//  //===----------------------------------------------------------------------===//  //  // This file defines some helpful functions for dealing with the possibility of @@ -72,10 +72,10 @@ static void PrintStack(raw_ostream &OS) {  static void PrintCurStackTrace(raw_ostream &OS) {    // Don't print an empty trace.    if (!PrettyStackTraceHead) return; -   +    // If there are pretty stack frames registered, walk and emit them.    OS << "Stack dump:\n"; -   +    PrintStack(OS);    OS.flush();  } @@ -85,9 +85,9 @@ static void PrintCurStackTrace(raw_ostream &OS) {  //  If any clients of llvm try to link to libCrashReporterClient.a themselves,  //  only one crash info struct will be used.  extern "C" { -CRASH_REPORTER_CLIENT_HIDDEN  -struct crashreporter_annotations_t gCRAnnotations  -        __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION)))  +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 @@ -114,17 +114,17 @@ static void CrashHandler(void *) {      raw_svector_ostream Stream(TmpStr);      PrintCurStackTrace(Stream);    } -   +    if (!TmpStr.empty()) {  #ifdef HAVE_CRASHREPORTERCLIENT_H      // Cast to void to avoid warning.      (void)CRSetCrashLogMessage(TmpStr.c_str()); -#elif HAVE_CRASHREPORTER_INFO  +#elif HAVE_CRASHREPORTER_INFO      __crashreporter_info__ = strdup(TmpStr.c_str());  #endif      errs() << TmpStr.str();    } -   +  #endif  }  | 
