Fix tests.

This commit is contained in:
Christoffer Lerno
2026-01-07 00:55:30 +01:00
parent 336ddb67c8
commit 824d064710
5 changed files with 29 additions and 23 deletions

View File

@@ -93,17 +93,17 @@ declare i1 @llvm.expect.i1(i1, i1)
!9 = !DISubroutineType(types: !10)
!10 = !{null}
!11 = !{}
!12 = !DILocalVariable(name: "a", scope: !8, file: !7, line: 12, type: !13, align: 4)
!12 = !DILocalVariable(name: "a", scope: !8, file: !7, line: 12, type: !13, align: 32)
!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!14 = !DILocation(line: 12, column: 6, scope: !8)
!15 = !DILocation(line: 12, column: 10, scope: !8)
!16 = !DILocalVariable(name: "x", scope: !8, file: !7, line: 13, type: !13, align: 4)
!16 = !DILocalVariable(name: "x", scope: !8, file: !7, line: 13, type: !13, align: 32)
!17 = !DILocation(line: 13, column: 6, scope: !8)
!18 = !DILocation(
!19 = distinct !DISubprogram(name: "@atomic_load",
!20 = !DIFile(filename: "mem.c3",
!21 = !DILocation(line: 13, column: 10, scope: !8)
!22 = !DILocalVariable(name: "y", scope: !8, file: !7, line: 14, type: !13, align: 4)
!22 = !DILocalVariable(name: "y", scope: !8, file: !7, line: 14, type: !13, align: 32)
!23 = !DILocation(line: 14, column: 6, scope: !8)
!24 = !DILocation(
!25 = distinct !DISubprogram(name: "@atomic_load", linkageName: "@atomic_load", scope: !20, file: !20

View File

@@ -7,6 +7,12 @@ const FOO @private = ~(uint)(0);
/* #expect: constants.ll
; ModuleID = 'constants'
source_filename = "constants"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"
@constants.AA = internal unnamed_addr constant i8 1, align 1, !dbg !0
@constants.BB = local_unnamed_addr constant i8 -56, align 1, !dbg !4
@constants.CC = internal unnamed_addr constant i32 -1, align 4, !dbg !6
@@ -20,12 +26,12 @@ const FOO @private = ~(uint)(0);
!2 = !DIFile(filename: "constants.c3",
!3 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char)
!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())
!5 = distinct !DIGlobalVariable(name: "BB", linkageName: "constants.BB", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true, align: 1)
!5 = distinct !DIGlobalVariable(name: "BB", linkageName: "constants.BB", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true, align: 8)
!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
!7 = distinct !DIGlobalVariable(name: "CC", linkageName: "constants.CC", scope: !2, file: !2, line: 3, type: !8, isLocal: true, isDefinition: true, align: 4)
!7 = distinct !DIGlobalVariable(name: "CC", linkageName: "constants.CC", scope: !2, file: !2, line: 3, type: !8, isLocal: true, isDefinition: true, align: 32)
!8 = !DIBasicType(name: "uint", size: 32, encoding: DW_ATE_unsigned)
!9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
!10 = distinct !DIGlobalVariable(name: "FOO", linkageName: "constants.FOO", scope: !2, file: !2, line: 4, type: !8, isLocal: true, isDefinition: true, align: 4)
!10 = distinct !DIGlobalVariable(name: "FOO", linkageName: "constants.FOO", scope: !2, file: !2, line: 4, type: !8, isLocal: true, isDefinition: true, align: 32)
!11 = !{i32 2, !"Dwarf Version", i32 4}
!12 = !{i32 2, !"Debug Info Version", i32 3}
!13 = !{i32 2, !"wchar_size", i32 4}

View File

@@ -18,16 +18,16 @@ const FOO @private = ~(uint)(0);
!llvm.dbg.cu = !{!17}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "AA", linkageName: "constants_mingw.AA", scope: !2, file: !2, line: 1, type: !3, isLocal: true, isDefinition: true, align: 1)
!2 = !DIFile(filename: "constants_mingw.c3", directory
!1 = distinct !DIGlobalVariable(name: "AA", linkageName: "constants_mingw.AA", scope: !2, file: !2, line: 1, type: !3, isLocal: true, isDefinition: true, align: 8)
!2 = !DIFile(filename: "constants_mingw.c3", directory:
!3 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char)
!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())
!5 = distinct !DIGlobalVariable(name: "BB", linkageName: "constants_mingw.BB", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true, align: 1)
!5 = distinct !DIGlobalVariable(name: "BB", linkageName: "constants_mingw.BB", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true, align: 8)
!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
!7 = distinct !DIGlobalVariable(name: "CC", linkageName: "constants_mingw.CC", scope: !2, file: !2, line: 3, type: !8, isLocal: true, isDefinition: true, align: 4)
!7 = distinct !DIGlobalVariable(name: "CC", linkageName: "constants_mingw.CC", scope: !2, file: !2, line: 3, type: !8, isLocal: true, isDefinition: true, align: 32)
!8 = !DIBasicType(name: "uint", size: 32, encoding: DW_ATE_unsigned)
!9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
!10 = distinct !DIGlobalVariable(name: "FOO", linkageName: "constants_mingw.FOO", scope: !2, file: !2, line: 4, type: !8, isLocal: true, isDefinition: true, align: 4)
!10 = distinct !DIGlobalVariable(name: "FOO", linkageName: "constants_mingw.FOO", scope: !2, file: !2, line: 4, type: !8, isLocal: true, isDefinition: true, align: 32)
!11 = !{i32 2, !"Dwarf Version", i32 4}
!12 = !{i32 2, !"Debug Info Version", i32 3}
!13 = !{i32 2, !"wchar_size", i32 4}

View File

@@ -636,7 +636,7 @@ no_match: ; preds = %compare
!21 = !{}
!22 = !DILocalVariable(name: "x", arg: 1, scope: !18, file: !7, line: 6, type: !15)
!23 = !DILocation(line: 6, column: 17, scope: !18)
!24 = !DILocalVariable(name: "a", scope: !18, file: !7, line: 8, type: !15, align: 4)
!24 = !DILocalVariable(name: "a", scope: !18, file: !7, line: 8, type: !15, align: 32)
!25 = !DILocation(line: 8, column: 7, scope: !18)
!26 = !DILocation(line: 8, column: 11, scope: !18)
!27 = !DILocation(line: 9, column: 2, scope: !18)
@@ -663,7 +663,7 @@ no_match: ; preds = %compare
!48 = !DIDerivedType(tag: DW_TAG_member, name: "len", scope: !35, baseType: !46, size: 64, align: 64, offset: 64)
!49 = !DILocalVariable(name: "args", arg: 1, scope: !32, file: !7, line: 15, type: !35)
!50 = !DILocation(line: 15, column: 22, scope: !32)
!51 = !DILocalVariable(name: "asdf", scope: !32, file: !7, line: 19, type: !52, align: 8)
!51 = !DILocalVariable(name: "asdf", scope: !32, file: !7, line: 19, type: !52, align: 64)
!52 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Foo*", baseType: !53, size: 64, align: 64, dwarfAddressSpace: 0)
!53 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", scope: !7, file: !7, line: 28, size: 64, align: 64, elements: !54, identifier: "test.Foo")
!54 = !{!55}
@@ -694,7 +694,7 @@ no_match: ; preds = %compare
!79 = distinct !DISubprogram(name: "test", linkageName: "test.test", scope: !7, file: !7, line: 45, type: !80, scopeLine: 45, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !21)
!80 = !DISubroutineType(types: !81)
!81 = !{!52, !82}
!82 = !DIDerivedType(tag: DW_TAG_typedef, name: "Color", scope: !7, file: !7, line: 87, baseType: !83, align: 16)
!82 = !DIDerivedType(tag: DW_TAG_typedef, name: "Color", scope: !7, file: !7, line: 87, baseType: !83, align: 128)
!83 = !DICompositeType(tag: DW_TAG_array_type, baseType: !84, size: 128, align: 32, flags: DIFlagVector, elements: !85)
!84 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
!85 = !{!86}
@@ -722,7 +722,7 @@ no_match: ; preds = %compare
!107 = distinct !DISubprogram(name: "test2", linkageName: "test.test2", scope: !7, file: !7, line: 51, type: !108, scopeLine: 51, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !21)
!108 = !DISubroutineType(types: !109)
!109 = !{!14}
!110 = !DILocalVariable(name: "scratch", scope: !111, file: !7, line: 123, type: !112, align: 8)
!110 = !DILocalVariable(name: "scratch", scope: !111, file: !7, line: 123, type: !112, align: 64)
!111 = distinct !DISubprogram(name: "@scratch", linkageName: "@scratch", scope: !7, file: !7, line: 121, scopeLine: 121, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !6, retainedNodes: !21)
!112 = !DICompositeType(tag: DW_TAG_structure_type, name: "Arena_Cursor", scope: !7, file: !7, line: 97, size: 128, align: 64, elements: !113, identifier: "foo__Arena_Cursor")
!113 = !{!114, !119}
@@ -736,11 +736,11 @@ no_match: ; preds = %compare
!121 = !DILocation
!122 = !DILocation
!123 = !DILocation
!124 = !DILocalVariable(name: "scratch", scope: !107, file: !7, line: 54, type: !115, align: 8)
!124 = !DILocalVariable(name: "scratch", scope: !107, file: !7, line: 54, type: !115, align: 64)
!125 = !DILocation(line: 54, column: 20, scope: !107)
!126 = !DILocation
!127 = distinct !DILexicalBlock(scope: !111, file: !7, line: 125, column: 2)
!128 = !DILocalVariable(name: "asdf", scope: !129, file: !7, line: 56, type: !14, align: 8)
!128 = !DILocalVariable(name: "asdf", scope: !129, file: !7, line: 56, type: !14, align: 64)
!129 = distinct !DILexicalBlock(scope: !107, file: !7, line: 55, column: 2)
!130 = !DILocation(line: 56, column: 12, scope: !129)
!131 = !DILocation(line: 57, column: 13, scope: !129)
@@ -754,11 +754,11 @@ no_match: ; preds = %compare
!139 = !DILocalVariable(name: ".anon", arg: 1, scope: !135, file: !7, line: 15, type: !15)
!140 = !DILocation(line: 15, column: 8, scope: !135)
!141 = !DILocalVariable(name: ".anon", arg: 2, scope: !135, file: !7, line: 15, type: !138)
!142 = !DILocalVariable(name: "list", scope: !143, file: !7, line: 45, type: !35, align: 8)
!142 = !DILocalVariable(name: "list", scope: !143, file: !7, line: 45, type: !35, align: 64)
!143 = distinct !DISubprogram(name: "@main_to_int_main_args", linkageName: "@main_to_int_main_args", scope: !144, file: !144
!144 = !DIFile(filename: "main_stub.c3"
!145 = !DILocation
!146 = !DILocalVariable(name: "list", scope: !147, file: !7, line: 24, type: !35, align: 8)
!146 = !DILocalVariable(name: "list", scope: !147, file: !7, line: 24, type: !35, align: 64)
!147 = distinct !DISubprogram(name: "args_to_strings"
!148 = !DILocation
!149 = !DILocation

View File

@@ -55,12 +55,12 @@ loop.exit: ; preds = %loop.cond
!27 = !DILocation(line: 3, column: 22, scope: !8)
!28 = !DILocation(line: 5, column: 15, scope: !29)
!29 = distinct !DILexicalBlock(scope: !8, file: !7, line: 5, column: 2)
!30 = !DILocalVariable(name: ".temp", scope: !29, file: !7, line: 5, type: !22, align: 8)
!31 = !DILocalVariable(name: "a", scope: !32, file: !7, line: 5, type: !15, align: 8)
!30 = !DILocalVariable(name: ".temp", scope: !29, file: !7, line: 5, type: !22, align: 64)
!31 = !DILocalVariable(name: "a", scope: !32, file: !7, line: 5, type: !15, align: 64)
!32 = distinct !DILexicalBlock(scope: !29, file: !7, line: 6, column: 2)
!33 = !DILocation(line: 5, column: 11, scope: !32)
!34 = !DILocation(line: 5, column: 15, scope: !32)
!35 = !DILocalVariable(name: "x", scope: !36, file: !7, line: 7, type: !37, align: 4)
!35 = !DILocalVariable(name: "x", scope: !36, file: !7, line: 7, type: !37, align: 32)
!36 = distinct !DILexicalBlock(scope: !32, file: !7, line: 6, column: 2)
!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!38 = !DILocation(line: 7, column: 7, scope: !36)