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

via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 07:05:47 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/DebugInfo/LogicalView/Core/LVElement.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h llvm/include/llvm/DebugInfo/LogicalView/Core/LVType.h llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp llvm/tools/llvm-debuginfo-analyzer/Options.cpp llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
index 2d4a0730c..470ea2c8c 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
@@ -1015,7 +1015,8 @@ void LVScope::printExtra(raw_ostream &OS, bool Full) const {
       OS << " -> " << typeOffsetAsString()
          << formattedNames(getTypeQualifiedName(), typeAsString());
     }
-    if (uint32_t Size = getStorageSizeInBytes(); options().getAttributeSize() && Size)
+    if (uint32_t Size = getStorageSizeInBytes();
+        options().getAttributeSize() && Size)
       OS << " [Size = " << Size << "]";
   }
   OS << "\n";
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp
index 76bfa1820..a283f5802 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp
@@ -293,7 +293,8 @@ void LVType::print(raw_ostream &OS, bool Full) const {
 
 void LVType::printExtra(raw_ostream &OS, bool Full) const {
   OS << formattedKind(kind()) << " " << formattedName(getName());
-  if (uint32_t Size = getStorageSizeInBytes(); options().getAttributeSize() && Size)
+  if (uint32_t Size = getStorageSizeInBytes();
+      options().getAttributeSize() && Size)
     OS << " [Size = " << Size << "]";
   OS << "\n";
 }

``````````

</details>


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


More information about the llvm-commits mailing list