mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -72,7 +72,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{!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 = !DILocation(line: 13, column: 31, scope: !4)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 13, column: 24, scope: !4)
|
||||
// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !2)
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ class A {
|
||||
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Init", linkageName: "_CInit.A.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{!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 = !DILocation(line: 16, column: 27, scope: !4)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 16, column: 33, scope: !4)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 16, column: 20, scope: !4)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ fn F() {
|
||||
// CHECK:STDOUT: !14 = !DISubroutineType(types: !15)
|
||||
// CHECK:STDOUT: !15 = !{!16, !17}
|
||||
// CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 8)
|
||||
// CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
||||
// CHECK:STDOUT: !18 = !{!19}
|
||||
// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !12, type: !17)
|
||||
// CHECK:STDOUT: !20 = !DILocation(line: 23, column: 46, scope: !12)
|
||||
|
||||
Reference in New Issue
Block a user