summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Symtab.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2014-04-20 13:17:36 +0000
committerEd Maste <emaste@freebsd.org>2014-04-20 13:17:36 +0000
commitd4612ad0f3e443c2a0fb8cf57cdb4a03ba546a96 (patch)
treea1bfee39ae65a095b95a0b2ccb70e80418fa173a /lldb/source/Symbol/Symtab.cpp
parent3a3ee3e3762a4fe0dbc084a6a3790377cee641e1 (diff)
downloadbcm5719-llvm-d4612ad0f3e443c2a0fb8cf57cdb4a03ba546a96.tar.gz
bcm5719-llvm-d4612ad0f3e443c2a0fb8cf57cdb4a03ba546a96.zip
Switch NULL to C++11 nullptr in source/Symbol and source/Utility
Patch by Robert Matusewicz llvm-svn: 206713
Diffstat (limited to 'lldb/source/Symbol/Symtab.cpp')
-rw-r--r--lldb/source/Symbol/Symtab.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
index b340ca272da..507271f64eb 100644
--- a/lldb/source/Symbol/Symtab.cpp
+++ b/lldb/source/Symbol/Symtab.cpp
@@ -85,7 +85,7 @@ Symtab::Dump (Stream *s, Target *target, SortOrder sort_order)
// 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 @@ Symtab::SymbolAtIndex(size_t idx)
// 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 @@ Symtab::SymbolAtIndex(size_t idx) const
// 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 @@ Symtab::InitNameIndexes()
// 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 @@ Symtab::FindSymbolWithType (SymbolType symbol_type, Debug symbol_debug_type, Vis
}
}
}
- return NULL;
+ return nullptr;
}
size_t
@@ -854,7 +854,7 @@ Symtab::FindFirstSymbolWithNameAndType (const ConstString &name, SymbolType symb
}
}
}
- return NULL;
+ return nullptr;
}
typedef struct
@@ -870,7 +870,7 @@ static int
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 @@ Symtab::FindSymbolContainingFileAddress (addr_t file_addr, const uint32_t* index
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 @@ Symtab::FindSymbolContainingFileAddress (addr_t file_addr, const uint32_t* index
if (info.match_offset < symbol_byte_size)
return info.match_symbol;
}
- return NULL;
+ return nullptr;
}
Symbol *
@@ -1039,7 +1039,7 @@ Symtab::FindSymbolContainingFileAddress (addr_t file_addr)
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 @@ Symtab::FindFunctionSymbols (const ConstString &name,
{
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 @@ Symtab::FindFunctionSymbols (const ConstString &name,
{
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 @@ Symtab::FindFunctionSymbols (const ConstString &name,
{
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);
OpenPOWER on IntegriCloud