diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index e9958a5ef759..1bfeb5aea360 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -895,6 +895,7 @@ UtilityFunction *AppleObjCRuntimeV2::CreateObjectChecker(const char *name) { } assert(len < (int)sizeof(check_function_code)); + UNUSED_IF_ASSERT_DISABLED(len); Error error; return GetTargetRef().GetUtilityFunctionForLanguage( diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index eb983154618b..fa79b24c4818 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -632,6 +632,7 @@ size_t ObjectFileELF::GetModuleSpecifications( // SetArchitecture should have set the vendor to unknown vendor = spec.GetArchitecture().GetTriple().getVendor(); assert(vendor == llvm::Triple::UnknownVendor); + UNUSED_IF_ASSERT_DISABLED(vendor); // // Validate it is ok to remove GetOsFromOSABI @@ -1524,6 +1525,7 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, GetOsFromOSABI(header.e_ident[EI_OSABI], ostype); spec_ostype = arch_spec.GetTriple().getOS(); assert(spec_ostype == ostype); + UNUSED_IF_ASSERT_DISABLED(spec_ostype); } if (arch_spec.GetMachine() == llvm::Triple::mips || diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 32e6765b4a1d..a20b709d58cb 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1532,6 +1532,7 @@ Error NativeProcessLinux::GetMemoryRegionInfo(lldb::addr_t load_addr, assert((proc_entry_info.GetRange().GetRangeBase() >= prev_base_address) && "descending /proc/pid/maps entries detected, unexpected"); prev_base_address = proc_entry_info.GetRange().GetRangeBase(); + UNUSED_IF_ASSERT_DISABLED(prev_base_address); // If the target address comes before this entry, indicate distance to next // region. diff --git a/lldb/source/Symbol/LineTable.cpp b/lldb/source/Symbol/LineTable.cpp index 02ab0c126117..49125bb8e406 100644 --- a/lldb/source/Symbol/LineTable.cpp +++ b/lldb/source/Symbol/LineTable.cpp @@ -501,6 +501,7 @@ LineTable *LineTable::LinkLineTable(const FileRangeMap &file_range_map) { if (terminate_previous_entry && !sequence.m_entries.empty()) { assert(prev_file_addr != LLDB_INVALID_ADDRESS); + UNUSED_IF_ASSERT_DISABLED(prev_file_addr); sequence.m_entries.push_back(sequence.m_entries.back()); if (prev_end_entry_linked_file_addr == LLDB_INVALID_ADDRESS) prev_end_entry_linked_file_addr =