[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
Tue May 13 00:56:11 PDT 2025
================
@@ -32,9 +32,9 @@
; ONE-NEXT: {File} 'test.cpp'
; ONE-NEXT: {Public} 'foo' [0x0000000000:0x000000003a]
; ONE-NEXT: [0x000000000b][002] {Range} Lines 2:9 [0x0000000000:0x000000003a]
-; ONE-NEXT: [0x00000000bc][002] {BaseType} 'bool'
-; ONE-NEXT: [0x0000000099][002] {BaseType} 'int'
-; ONE-NEXT: [0x00000000b5][002] {BaseType} 'unsigned int'
+; ONE-NEXT: [0x00000000bc][002] {BaseType} 'bool' [Size = 1]
+; ONE-NEXT: [0x0000000099][002] {BaseType} 'int' [Size = 4]
+; ONE-NEXT: [0x00000000b5][002] {BaseType} 'unsigned int' [Size = 4]
----------------
CarlosAlbertoEnciso wrote:
I see your point.
We are dealing with a `size` that is applied to:
- Symbol (bit fields): bit size
- Type (type or scope): byte size.
My concern is that if we use any of the explicit notations:
`'bool' [Size = 1]` or `'bool' [sizeof(bool) == 1]` the output can become very dense, as the type (type or scope) is used everywhere.
But at the same time (as per your point), we don't want for those sizes to get confused just by using the `:` as separator.
https://github.com/llvm/llvm-project/pull/139110
More information about the llvm-commits
mailing list