Switch NULL to C++11 nullptr in source/Symbol and source/Utility

Patch by Robert Matusewicz

llvm-svn: 206713
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
index b340ca2..507271f 100644
--- a/lldb/source/Symbol/Symtab.cpp
+++ b/lldb/source/Symbol/Symtab.cpp
@@ -85,7 +85,7 @@
 //    s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
     s->Indent();
     const FileSpec &file_spec = m_objfile->GetFileSpec();
-    const char * object_name = NULL;
+    const char * object_name = nullptr;
     if (m_objfile->GetModule())
         object_name = m_objfile->GetModule()->GetObjectName().GetCString();
 
@@ -232,7 +232,7 @@
     // when calling this function to avoid performance issues.
     if (idx < m_symbols.size())
         return &m_symbols[idx];
-    return NULL;
+    return nullptr;
 }
 
 
@@ -243,7 +243,7 @@
     // when calling this function to avoid performance issues.
     if (idx < m_symbols.size())
         return &m_symbols[idx];
-    return NULL;
+    return nullptr;
 }
 
 //----------------------------------------------------------------------
@@ -286,7 +286,7 @@
         // The "const char *" in "class_contexts" must come from a ConstString::GetCString()
         std::set<const char *> class_contexts;
         UniqueCStringMap<uint32_t> mangled_name_to_index;
-        std::vector<const char *> symbol_contexts(num_symbols, NULL);
+        std::vector<const char *> symbol_contexts(num_symbols, nullptr);
 
         for (entry.value = 0; entry.value<num_symbols; ++entry.value)
         {
@@ -776,7 +776,7 @@
             }
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 size_t
@@ -854,7 +854,7 @@
             }
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 typedef struct
@@ -870,7 +870,7 @@
 SymbolWithClosestFileAddress (SymbolSearchInfo *info, const uint32_t *index_ptr)
 {
     const Symbol *symbol = info->symtab->SymbolAtIndex (index_ptr[0]);
-    if (symbol == NULL)
+    if (symbol == nullptr)
         return -1;
 
     const addr_t info_file_addr = info->file_addr;
@@ -995,7 +995,7 @@
     Mutex::Locker locker (m_mutex);
 
     
-    SymbolSearchInfo info = { this, file_addr, NULL, NULL, 0 };
+    SymbolSearchInfo info = { this, file_addr, nullptr, nullptr, 0 };
 
     ::bsearch (&info, 
                indexes, 
@@ -1025,7 +1025,7 @@
         if (info.match_offset < symbol_byte_size)
             return info.match_symbol;
     }
-    return NULL;
+    return nullptr;
 }
 
 Symbol *
@@ -1039,7 +1039,7 @@
     const FileRangeToIndexMap::Entry *entry = m_file_addr_to_index.FindEntryThatContains(file_addr);
     if (entry)
         return SymbolAtIndex(entry->data);
-    return NULL;
+    return nullptr;
 }
 
 void
@@ -1118,7 +1118,7 @@
         {
             const UniqueCStringMap<uint32_t>::Entry *match;
             for (match = m_basename_to_index.FindFirstValueForName(name_cstr);
-                 match != NULL;
+                 match != nullptr;
                  match = m_basename_to_index.FindNextValueForName(match))
             {
                 symbol_indexes.push_back(match->value);
@@ -1135,7 +1135,7 @@
         {
             const UniqueCStringMap<uint32_t>::Entry *match;
             for (match = m_method_to_index.FindFirstValueForName(name_cstr);
-                 match != NULL;
+                 match != nullptr;
                  match = m_method_to_index.FindNextValueForName(match))
             {
                 symbol_indexes.push_back(match->value);
@@ -1152,7 +1152,7 @@
         {
             const UniqueCStringMap<uint32_t>::Entry *match;
             for (match = m_selector_to_index.FindFirstValueForName(name_cstr);
-                 match != NULL;
+                 match != nullptr;
                  match = m_selector_to_index.FindNextValueForName(match))
             {
                 symbol_indexes.push_back(match->value);