diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-20 15:00:15 +0000 |
| commit | 763d4102c9736544f95a61d4d0a9a5be8c5a5df1 (patch) | |
| tree | b4a2965a49e80461fb52cd69d55f966058e7ef4d /contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp | |
| parent | 0e23b2ff8c430cd1145afb7bd55917c326bb1d06 (diff) | |
| parent | 94994d372d014ce4c8758b9605d63fae651bd8aa (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp index af040322ec52..cfe61992be0d 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -153,8 +153,7 @@ void ObjectFileJIT::Dump(Stream *s) { s->Indent(); s->PutCString("ObjectFileJIT"); - ArchSpec arch; - if (GetArchitecture(arch)) + if (ArchSpec arch = GetArchitecture()) *s << ", arch = " << arch.GetArchitectureName(); s->EOL(); @@ -184,17 +183,16 @@ lldb_private::Address ObjectFileJIT::GetEntryPointAddress() { return Address(); } -lldb_private::Address ObjectFileJIT::GetHeaderAddress() { return Address(); } +lldb_private::Address ObjectFileJIT::GetBaseAddress() { return Address(); } ObjectFile::Type ObjectFileJIT::CalculateType() { return eTypeJIT; } ObjectFile::Strata ObjectFileJIT::CalculateStrata() { return eStrataJIT; } -bool ObjectFileJIT::GetArchitecture(ArchSpec &arch) { - ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock()); - if (delegate_sp) - return delegate_sp->GetArchitecture(arch); - return false; +ArchSpec ObjectFileJIT::GetArchitecture() { + if (ObjectFileJITDelegateSP delegate_sp = m_delegate_wp.lock()) + return delegate_sp->GetArchitecture(); + return ArchSpec(); } //------------------------------------------------------------------ @@ -218,7 +216,7 @@ bool ObjectFileJIT::SetLoadAddress(Target &target, lldb::addr_t value, // that size on disk (to avoid __PAGEZERO) and load them SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx)); if (section_sp && section_sp->GetFileSize() > 0 && - section_sp->IsThreadSpecific() == false) { + !section_sp->IsThreadSpecific()) { if (target.GetSectionLoadList().SetSectionLoadAddress( section_sp, section_sp->GetFileAddress() + value)) ++num_loaded_sections; |
