summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/SymbolContext.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-03-02 03:01:16 +0000
committerGreg Clayton <gclayton@apple.com>2012-03-02 03:01:16 +0000
commitda171f11763c75dd173ad56e04508bbe5ae6d7e8 (patch)
tree4eca2cd020f8c5cea2eeb7d1c6409c62c2425efe /lldb/source/Symbol/SymbolContext.cpp
parentf5e086f18e4db14af225ae078db0439e4dfdb145 (diff)
downloadbcm5719-llvm-da171f11763c75dd173ad56e04508bbe5ae6d7e8.tar.gz
bcm5719-llvm-da171f11763c75dd173ad56e04508bbe5ae6d7e8.zip
Fixed Symbol objects being able to get their byte size.
llvm-svn: 151878
Diffstat (limited to 'lldb/source/Symbol/SymbolContext.cpp')
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 7fca260702b..1c764e89ef5 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -427,26 +427,16 @@ SymbolContext::GetAddressRange (uint32_t scope,
}
}
- if ((scope & eSymbolContextSymbol) && (symbol != NULL) && (symbol->GetAddressRangePtr() != NULL))
+ if ((scope & eSymbolContextSymbol) && (symbol != NULL))
{
if (range_idx == 0)
{
- range = *symbol->GetAddressRangePtr();
-
- if (range.GetByteSize() == 0)
+ const AddressRange *range_ptr = symbol->GetAddressRangePtr();
+ if (range_ptr)
{
- if (module_sp)
- {
- ObjectFile *objfile = module_sp->GetObjectFile();
- if (objfile)
- {
- Symtab *symtab = objfile->GetSymtab();
- if (symtab)
- range.SetByteSize(symtab->CalculateSymbolSize (symbol));
- }
- }
+ range = *range_ptr;
+ return true;
}
- return true;
}
}
range.Clear();
OpenPOWER on IntegriCloud