diff options
Diffstat (limited to 'contrib/llvm/lib/Support/PrettyStackTrace.cpp')
-rw-r--r-- | contrib/llvm/lib/Support/PrettyStackTrace.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm/lib/Support/PrettyStackTrace.cpp b/contrib/llvm/lib/Support/PrettyStackTrace.cpp index 722f4ca..987778a 100644 --- a/contrib/llvm/lib/Support/PrettyStackTrace.cpp +++ b/contrib/llvm/lib/Support/PrettyStackTrace.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/PrettyStackTrace.h" +#include "llvm-c/Core.h" #include "llvm/ADT/SmallString.h" #include "llvm/Config/config.h" // Get autoconf configuration settings #include "llvm/Support/ManagedStatic.h" @@ -20,7 +21,6 @@ #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> @@ -46,7 +46,7 @@ static unsigned PrintStack(const PrettyStackTraceEntry *Entry, raw_ostream &OS){ /// PrintCurStackTrace - Print the current stack trace to the specified stream. static void PrintCurStackTrace(raw_ostream &OS) { // Don't print an empty trace. - if (PrettyStackTraceHead->get() == 0) return; + if (!PrettyStackTraceHead->get()) return; // If there are pretty stack frames registered, walk and emit them. OS << "Stack dump:\n"; @@ -136,7 +136,7 @@ void PrettyStackTraceProgram::print(raw_ostream &OS) const { } static bool RegisterCrashPrinter() { - sys::AddSignalHandler(CrashHandler, 0); + sys::AddSignalHandler(CrashHandler, nullptr); return false; } |