================
@@ -2210,9 +2216,16 @@ bool DWARFASTParserClang::CompleteRecordType(const 
DWARFDIE &die,
       !layout_info.vbase_offsets.empty()) {
     if (type)
       layout_info.bit_size = type->GetByteSize(nullptr).value_or(0) * 8;
-    if (layout_info.bit_size == 0)
-      layout_info.bit_size =
-          die.GetAttributeValueAsUnsigned(DW_AT_byte_size, 0) * 8;
+    if (layout_info.bit_size == 0) {
+      auto byte_size =
+          die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
+
+      if (byte_size != UINT64_MAX)
+        layout_info.bit_size = byte_size;
----------------
Michael137 wrote:

How come we don't need to do the `* 8` here to go from bytes to bits?

https://github.com/llvm/llvm-project/pull/69741
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to