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

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 03:48:35 PDT 2025


================
@@ -239,6 +243,9 @@ class LVElement : public LVObject {
   virtual bool isBase() const { return false; }
   virtual bool isTemplateParam() const { return false; }
 
+  uint32_t getStorageSizeInBytes() const {
+    return (getBitSize() + (DWARF_CHAR_BIT - 1)) / DWARF_CHAR_BIT;
----------------
OCHyams wrote:

It might be clearer to use `llvm::divideceil` from MathExtras.h instead?

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


More information about the llvm-commits mailing list