[lldb] Eliminate check for HasLoadedSections (NFC) (#145366)
We can omit the call to Target::HasLoadedSections as Address::HasLoadedSections already "does the right thing" and returns LLDB_INVALID_ADDRESS if no sections are loaded.
This commit is contained in:
committed by
GitHub
parent
a451fff1ad
commit
c04e804a31
@@ -470,9 +470,7 @@ static bool DumpAddressAndContent(Stream &s, const SymbolContext *sc,
|
||||
bool print_file_addr_or_load_addr) {
|
||||
Target *target = Target::GetTargetFromContexts(exe_ctx, sc);
|
||||
|
||||
addr_t vaddr = LLDB_INVALID_ADDRESS;
|
||||
if (target && target->HasLoadedSections())
|
||||
vaddr = addr.GetLoadAddress(target);
|
||||
addr_t vaddr = addr.GetLoadAddress(target);
|
||||
if (vaddr == LLDB_INVALID_ADDRESS)
|
||||
vaddr = addr.GetFileAddress();
|
||||
if (vaddr == LLDB_INVALID_ADDRESS)
|
||||
|
||||
Reference in New Issue
Block a user