[llvm] [llvm-debuginfo-analyzer] Add support for DWARF `DW_AT_byte_size` (PR #139110)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 23:28:17 PDT 2025


================
@@ -1011,9 +1011,13 @@ void LVScope::printExtra(raw_ostream &OS, bool Full) const {
   // Do not print any type or name for a lexical block.
   if (!getIsBlock()) {
     OS << " " << formattedName(getName());
-    if (!getIsAggregate())
+    if (!getIsAggregate()) {
       OS << " -> " << typeOffsetAsString()
          << formattedNames(getTypeQualifiedName(), typeAsString());
+    }
+    if (uint32_t Size = getStorageSizeInBytes();
+        options().getAttributeSize() && Size)
----------------
CarlosAlbertoEnciso wrote:

May be rearrange the conditions to call `getStorageSizeInBytes()` only when `options().getAttributeSize()` is true `(--attribute=size)`.

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


More information about the llvm-commits mailing list