forked from OSchip/llvm-project
[LLDB] Switch from using member_clang_type.GetByteSize() to member_type->GetByteSize() in ParseSingleMember
We have a bug in which using member_clang_type.GetByteSize() triggers record layout and during this process since the record was not yet complete we ended up reaching a record that had not been layed out yet. Using member_type->GetByteSize() avoids this situation since it relies on size from DWARF and will not trigger record layout. For reference: rdar://77293040 Differential Revision: https://reviews.llvm.org/D102445
This commit is contained in:
parent
0633d5ce7b
commit
2182eda306
|
@ -2671,7 +2671,7 @@ void DWARFASTParserClang::ParseSingleMember(
|
|||
last_field_info.bit_offset = field_bit_offset;
|
||||
|
||||
if (llvm::Optional<uint64_t> clang_type_size =
|
||||
member_clang_type.GetByteSize(nullptr)) {
|
||||
member_type->GetByteSize(nullptr)) {
|
||||
last_field_info.bit_size = *clang_type_size * character_width;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue