diff options
Diffstat (limited to 'source/Symbol/DWARFCallFrameInfo.cpp')
| -rw-r--r-- | source/Symbol/DWARFCallFrameInfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/Symbol/DWARFCallFrameInfo.cpp b/source/Symbol/DWARFCallFrameInfo.cpp index 1bf9ff99e015..c8c3a10026a2 100644 --- a/source/Symbol/DWARFCallFrameInfo.cpp +++ b/source/Symbol/DWARFCallFrameInfo.cpp @@ -161,7 +161,7 @@ bool DWARFCallFrameInfo::GetUnwindPlan(Address addr, UnwindPlan &unwind_plan) { module_sp->GetObjectFile() != &m_objfile) return false; - if (GetFDEEntryByFileAddress(addr.GetFileAddress(), fde_entry) == false) + if (!GetFDEEntryByFileAddress(addr.GetFileAddress(), fde_entry)) return false; return FDEToUnwindPlan(fde_entry.data, addr, unwind_plan); } @@ -243,7 +243,7 @@ DWARFCallFrameInfo::CIESP DWARFCallFrameInfo::ParseCIE(const dw_offset_t cie_offset) { CIESP cie_sp(new CIE(cie_offset)); lldb::offset_t offset = cie_offset; - if (m_cfi_data_initialized == false) + if (!m_cfi_data_initialized) GetCFIData(); uint32_t length = m_cfi_data.GetU32(&offset); dw_offset_t cie_id, end_offset; @@ -394,7 +394,7 @@ DWARFCallFrameInfo::ParseCIE(const dw_offset_t cie_offset) { } void DWARFCallFrameInfo::GetCFIData() { - if (m_cfi_data_initialized == false) { + if (!m_cfi_data_initialized) { Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND)); if (log) m_objfile.GetModule()->LogMessage(log, "Reading EH frame info"); @@ -423,15 +423,14 @@ void DWARFCallFrameInfo::GetFDEIndex() { m_objfile.GetFileSpec().GetFilename().AsCString("")); bool clear_address_zeroth_bit = false; - ArchSpec arch; - if (m_objfile.GetArchitecture(arch)) { + if (ArchSpec arch = m_objfile.GetArchitecture()) { if (arch.GetTriple().getArch() == llvm::Triple::arm || arch.GetTriple().getArch() == llvm::Triple::thumb) clear_address_zeroth_bit = true; } lldb::offset_t offset = 0; - if (m_cfi_data_initialized == false) + if (!m_cfi_data_initialized) GetCFIData(); while (m_cfi_data.ValidOffsetForDataOfSize(offset, 8)) { const dw_offset_t current_entry = offset; @@ -533,7 +532,7 @@ bool DWARFCallFrameInfo::FDEToUnwindPlan(dw_offset_t dwarf_offset, if (m_section_sp.get() == nullptr || m_section_sp->IsEncrypted()) return false; - if (m_cfi_data_initialized == false) + if (!m_cfi_data_initialized) GetCFIData(); uint32_t length = m_cfi_data.GetU32(&offset); |
