[C++] Use 'nullptr'. Tools edition.

llvm-svn: 207176
diff --git a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 837ed19..4a9bbe5 100644
--- a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -171,7 +171,7 @@
 std::string LLVMSymbolizer::symbolizeCode(const std::string &ModuleName,
                                           uint64_t ModuleOffset) {
   ModuleInfo *Info = getOrCreateModuleInfo(ModuleName);
-  if (Info == 0)
+  if (!Info)
     return printDILineInfo(DILineInfo());
   if (Opts.PrintInlining) {
     DIInliningInfo InlinedContext =
@@ -232,7 +232,7 @@
                             std::string &Result) {
   std::string OrigRealPath = OrigPath;
 #if defined(HAVE_REALPATH)
-  if (char *RP = realpath(OrigPath.c_str(), NULL)) {
+  if (char *RP = realpath(OrigPath.c_str(), nullptr)) {
     OrigRealPath = RP;
     free(RP);
   }
@@ -298,8 +298,8 @@
   BinaryMapTy::iterator I = BinaryForPath.find(Path);
   if (I != BinaryForPath.end())
     return I->second;
-  Binary *Bin = 0;
-  Binary *DbgBin = 0;
+  Binary *Bin = nullptr;
+  Binary *DbgBin = nullptr;
   ErrorOr<Binary *> BinaryOrErr = createBinary(Path);
   if (!error(BinaryOrErr.getError())) {
     std::unique_ptr<Binary> ParsedBinary(BinaryOrErr.get());
@@ -319,7 +319,7 @@
       }
     }
     // Try to locate the debug binary using .gnu_debuglink section.
-    if (DbgBin == 0) {
+    if (!DbgBin) {
       std::string DebuglinkName;
       uint32_t CRCHash;
       std::string DebugBinaryPath;
@@ -333,7 +333,7 @@
       }
     }
   }
-  if (DbgBin == 0)
+  if (!DbgBin)
     DbgBin = Bin;
   BinaryPair Res = std::make_pair(Bin, DbgBin);
   BinaryForPath[Path] = Res;
@@ -342,9 +342,9 @@
 
 ObjectFile *
 LLVMSymbolizer::getObjectFileFromBinary(Binary *Bin, const std::string &ArchName) {
-  if (Bin == 0)
-    return 0;
-  ObjectFile *Res = 0;
+  if (!Bin)
+    return nullptr;
+  ObjectFile *Res = nullptr;
   if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(Bin)) {
     ObjectFileForArchMapTy::iterator I = ObjectFileForArch.find(
         std::make_pair(UB, ArchName));
@@ -382,10 +382,10 @@
   ObjectFile *Obj = getObjectFileFromBinary(Binaries.first, ArchName);
   ObjectFile *DbgObj = getObjectFileFromBinary(Binaries.second, ArchName);
 
-  if (Obj == 0) {
+  if (!Obj) {
     // Failed to find valid object file.
-    Modules.insert(make_pair(ModuleName, (ModuleInfo *)0));
-    return 0;
+    Modules.insert(make_pair(ModuleName, (ModuleInfo *)nullptr));
+    return nullptr;
   }
   DIContext *Context = DIContext::getDWARFContext(DbgObj);
   assert(Context);
@@ -427,7 +427,7 @@
   if (Name.substr(0, 2) != "_Z")
     return Name;
   int status = 0;
-  char *DemangledName = __cxa_demangle(Name.c_str(), 0, 0, &status);
+  char *DemangledName = __cxa_demangle(Name.c_str(), nullptr, nullptr, &status);
   if (status != 0)
     return Name;
   std::string Result = DemangledName;