summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Function.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/Function.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/Function.cpp')
-rw-r--r--lldb/source/Symbol/Function.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 85132144c88..0b7430ad75e 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -215,7 +215,7 @@ Function::Function
m_prologue_byte_size (0)
{
m_block.SetParentScope(this);
- assert(comp_unit != NULL);
+ assert(comp_unit != nullptr);
}
Function::Function
@@ -239,7 +239,7 @@ Function::Function
m_prologue_byte_size (0)
{
m_block.SetParentScope(this);
- assert(comp_unit != NULL);
+ assert(comp_unit != nullptr);
}
@@ -253,10 +253,10 @@ Function::GetStartLineSourceInfo (FileSpec &source_file, uint32_t &line_no)
line_no = 0;
source_file.Clear();
- if (m_comp_unit == NULL)
+ if (m_comp_unit == nullptr)
return;
- if (m_type != NULL && m_type->GetDeclaration().GetLine() != 0)
+ if (m_type != nullptr && m_type->GetDeclaration().GetLine() != 0)
{
source_file = m_type->GetDeclaration().GetFile();
line_no = m_type->GetDeclaration().GetLine();
@@ -264,11 +264,11 @@ Function::GetStartLineSourceInfo (FileSpec &source_file, uint32_t &line_no)
else
{
LineTable *line_table = m_comp_unit->GetLineTable();
- if (line_table == NULL)
+ if (line_table == nullptr)
return;
LineEntry line_entry;
- if (line_table->FindLineEntryByAddress (GetAddressRange().GetBaseAddress(), line_entry, NULL))
+ if (line_table->FindLineEntryByAddress (GetAddressRange().GetBaseAddress(), line_entry, nullptr))
{
line_no = line_entry.line;
source_file = line_entry.file;
@@ -288,11 +288,11 @@ Function::GetEndLineSourceInfo (FileSpec &source_file, uint32_t &line_no)
scratch_addr.SetOffset (scratch_addr.GetOffset() + GetAddressRange().GetByteSize() - 1);
LineTable *line_table = m_comp_unit->GetLineTable();
- if (line_table == NULL)
+ if (line_table == nullptr)
return;
LineEntry line_entry;
- if (line_table->FindLineEntryByAddress (scratch_addr, line_entry, NULL))
+ if (line_table->FindLineEntryByAddress (scratch_addr, line_entry, nullptr))
{
line_no = line_entry.line;
source_file = line_entry.file;
@@ -411,7 +411,7 @@ Function::GetInstructions (const ExecutionContext &exe_ctx,
{
const bool prefer_file_cache = false;
return Disassembler::DisassembleRange (module_sp->GetArchitecture(),
- NULL,
+ nullptr,
flavor,
exe_ctx,
GetAddressRange(),
@@ -467,17 +467,17 @@ Function::GetClangDeclContext()
CalculateSymbolContext (&sc);
if (!sc.module_sp)
- return NULL;
+ return nullptr;
SymbolVendor *sym_vendor = sc.module_sp->GetSymbolVendor();
if (!sym_vendor)
- return NULL;
+ return nullptr;
SymbolFile *sym_file = sym_vendor->GetSymbolFile();
if (!sym_file)
- return NULL;
+ return nullptr;
return sym_file->GetClangDeclContextForTypeUID (sc, m_uid);
}
@@ -485,24 +485,24 @@ Function::GetClangDeclContext()
Type*
Function::GetType()
{
- if (m_type == NULL)
+ if (m_type == nullptr)
{
SymbolContext sc;
CalculateSymbolContext (&sc);
if (!sc.module_sp)
- return NULL;
+ return nullptr;
SymbolVendor *sym_vendor = sc.module_sp->GetSymbolVendor();
- if (sym_vendor == NULL)
- return NULL;
+ if (sym_vendor == nullptr)
+ return nullptr;
SymbolFile *sym_file = sym_vendor->GetSymbolFile();
- if (sym_file == NULL)
- return NULL;
+ if (sym_file == nullptr)
+ return nullptr;
m_type = sym_file->ResolveTypeUID(m_type_uid);
}
OpenPOWER on IntegriCloud