[llvm] [lldb] Fix size in bytes of type DIEs when size in bits is not a multiple of 8 (PR #69741)

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 22:33:29 PST 2023


================
@@ -298,6 +298,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) {
       byte_size = form_value.Unsigned();
       break;
 
+    case DW_AT_bit_size:
+      // Convert the bit size to byte size, and round it up to the minimum about
+      // of bytes that will fit the bits.
+      byte_size = (form_value.Unsigned() + 7) / 8;
----------------
Michael137 wrote:

Oh kind-of-related discourse post from last year: https://discourse.llvm.org/t/rfc-proper-low-level-abstractions-to-llvm-bits-bytes-addresses-and-masks/63081

Looks like it was never resolved

https://github.com/llvm/llvm-project/pull/69741


More information about the llvm-commits mailing list