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
@@ -170,7 +170,7 @@ fn M() {
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
// CHECK:STDOUT: !6 = !{!7, !7}
// CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 8)
// CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
// CHECK:STDOUT: !8 = !{!9}
// CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7)
// CHECK:STDOUT: !10 = !DILocation(line: 15, column: 42, scope: !4)