Reverting r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957...
[oota-llvm.git] / lib / Support / PrettyStackTrace.cpp
index d4e205cdb3ce921a9bef5d95dc518e05f2f48ce6..987778a1bde66999171556f571c94c59e352dddb 100644 (file)
@@ -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;
 }