[Lldb-commits] [lldb] [llvm] Emit DIE's size in bits when size is not a multiple of 8 (PR #69741)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 10 12:58:28 PST 2023
================
@@ -2866,8 +2879,12 @@ void DWARFASTParserClang::ParseSingleMember(
// Get the parent byte size so we can verify any members will fit
const uint64_t parent_byte_size =
parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
- const uint64_t parent_bit_size =
- parent_byte_size == UINT64_MAX ? UINT64_MAX : parent_byte_size * 8;
+ uint64_t parent_bit_size;
+ if (parent_byte_size != UINT64_MAX)
+ parent_bit_size = parent_byte_size * 8;
+ else
+ parent_bit_size =
+ parent_die.GetAttributeValueAsUnsigned(DW_AT_bit_size, UINT64_MAX);
----------------
Michael137 wrote:
DWARFASTParserClang has unittests where we sometimes use Yaml2Obj and directly invoke the parser. But it's quite finicky. Let me know if you run into troubles with it
https://github.com/llvm/llvm-project/pull/69741
More information about the lldb-commits
mailing list