forked from OSchip/llvm-project
Simplify & correct the patch I wrote in r297441, after thinking
about this more I realized I could make the change isolated to whether we decide an empty accelerator table is valid or not. <rdar://problem/30867462> llvm-svn: 297496
This commit is contained in:
parent
04cb08cc83
commit
19cf689a9e
|
@ -356,10 +356,6 @@ public:
|
|||
m_header.bucket_count > 0;
|
||||
}
|
||||
|
||||
bool HasContent() const {
|
||||
return IsValid() && m_header.hashes_count > 0;
|
||||
}
|
||||
|
||||
uint32_t GetHashIndex(uint32_t bucket_idx) const {
|
||||
if (m_hash_indexes && bucket_idx < m_header.bucket_count)
|
||||
return m_hash_indexes[bucket_idx];
|
||||
|
|
|
@ -448,19 +448,19 @@ void SymbolFileDWARF::InitializeObject() {
|
|||
if (m_data_apple_names.m_data.GetByteSize() > 0) {
|
||||
m_apple_names_ap.reset(new DWARFMappedHash::MemoryTable(
|
||||
m_data_apple_names.m_data, get_debug_str_data(), ".apple_names"));
|
||||
if (!m_apple_names_ap->IsValid())
|
||||
m_apple_names_ap.reset();
|
||||
if (m_apple_names_ap->HasContent())
|
||||
if (m_apple_names_ap->IsValid())
|
||||
m_using_apple_tables = true;
|
||||
else
|
||||
m_apple_names_ap.reset();
|
||||
}
|
||||
get_apple_types_data();
|
||||
if (m_data_apple_types.m_data.GetByteSize() > 0) {
|
||||
m_apple_types_ap.reset(new DWARFMappedHash::MemoryTable(
|
||||
m_data_apple_types.m_data, get_debug_str_data(), ".apple_types"));
|
||||
if (!m_apple_types_ap->IsValid())
|
||||
m_apple_types_ap.reset();
|
||||
if (m_apple_types_ap->HasContent())
|
||||
if (m_apple_types_ap->IsValid())
|
||||
m_using_apple_tables = true;
|
||||
else
|
||||
m_apple_types_ap.reset();
|
||||
}
|
||||
|
||||
get_apple_namespaces_data();
|
||||
|
@ -468,20 +468,20 @@ void SymbolFileDWARF::InitializeObject() {
|
|||
m_apple_namespaces_ap.reset(new DWARFMappedHash::MemoryTable(
|
||||
m_data_apple_namespaces.m_data, get_debug_str_data(),
|
||||
".apple_namespaces"));
|
||||
if (!m_apple_namespaces_ap->IsValid())
|
||||
m_apple_namespaces_ap.reset();
|
||||
if (m_apple_namespaces_ap->HasContent())
|
||||
if (m_apple_namespaces_ap->IsValid())
|
||||
m_using_apple_tables = true;
|
||||
else
|
||||
m_apple_namespaces_ap.reset();
|
||||
}
|
||||
|
||||
get_apple_objc_data();
|
||||
if (m_data_apple_objc.m_data.GetByteSize() > 0) {
|
||||
m_apple_objc_ap.reset(new DWARFMappedHash::MemoryTable(
|
||||
m_data_apple_objc.m_data, get_debug_str_data(), ".apple_objc"));
|
||||
if (!m_apple_objc_ap->IsValid())
|
||||
m_apple_objc_ap.reset();
|
||||
if (m_apple_objc_ap->HasContent())
|
||||
if (m_apple_objc_ap->IsValid())
|
||||
m_using_apple_tables = true;
|
||||
else
|
||||
m_apple_objc_ap.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue