Fix pointer sizes in debug info. (#7002)

The size is in bits, so 8 is an unlikely value. Also, don't hardcode a
size, ask the data layout for it.
This commit is contained in:
Richard Smith
2026-04-01 16:35:12 +00:00
committed by GitHub
parent 8f3b057179
commit dfac728571
104 changed files with 153 additions and 146 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ fn G() -> i32 {
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
// CHECK:STDOUT: !6 = !{!7, !8, !7}
// CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 8)
// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !9 = !{!10, !11}
// CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8)
// CHECK:STDOUT: !11 = !DILocalVariable(arg: 2, scope: !4, type: !7)