forked from OSchip/llvm-project
Fix more unused variable warnings when asserts are disabled.
llvm-svn: 292598
This commit is contained in:
parent
2737989245
commit
b1554311d3
|
@ -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(
|
||||
|
|
|
@ -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 ||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue