Skip to content

Commit e1d10df

Browse files
committed
rusty: Update testsuite with cargo insta
1 parent 220f6d0 commit e1d10df

File tree

367 files changed

+633
-978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+633
-978
lines changed

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__external_files__external_file_function_call.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: "results.join(\"\\n\")"
55
; ModuleID = 'main.st'
66
source_filename = "main.st"
77

8-
define i16 @main() {
8+
define i16 @main() section "fn-main:i16" {
99
entry:
1010
%main = alloca i16, align 2
1111
store i16 0, i16* %main, align 2
@@ -14,10 +14,9 @@ entry:
1414
ret i16 %main_ret
1515
}
1616

17-
declare i16 @external()
17+
declare i16 @external() section "fn-external:i16"
1818

1919
; ModuleID = 'external.st'
2020
source_filename = "external.st"
2121

22-
declare i16 @external()
23-
22+
declare i16 @external() section "fn-external:i16"

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__external_files__external_file_global_var.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source_filename = "main.st"
88
@x = external global i16
99
@y = external global i16
1010

11-
define i16 @main() {
11+
define i16 @main() section "fn-main:i16" {
1212
entry:
1313
%main = alloca i16, align 2
1414
store i16 0, i16* %main, align 2
@@ -19,13 +19,12 @@ entry:
1919
ret i16 %main_ret
2020
}
2121

22-
declare i16 @external()
22+
declare i16 @external() section "fn-external:i16"
2323

2424
; ModuleID = 'external.st'
2525
source_filename = "external.st"
2626

2727
@x = external global i16
2828
@y = external global i16
2929

30-
declare i16 @external()
31-
30+
declare i16 @external() section "fn-external:i16"

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__multi_files__multiple_files_in_different_locations_with_debug_info.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source_filename = "app/file1.st"
99

1010
@mainProg_instance = external global %mainProg, !dbg !0
1111

12-
define i16 @main() !dbg !10 {
12+
define i16 @main() section "fn-main:i16" !dbg !10 {
1313
entry:
1414
%main = alloca i16, align 2, !dbg !14
1515
call void @llvm.dbg.declare(metadata i16* %main, metadata !15, metadata !DIExpression()), !dbg !17
@@ -19,7 +19,7 @@ entry:
1919
ret i16 %main_ret, !dbg !14
2020
}
2121

22-
declare !dbg !18 void @mainProg(%mainProg*)
22+
declare !dbg !18 void @mainProg(%mainProg*) section "fn-mainProg:v"
2323

2424
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
2525
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
@@ -56,7 +56,7 @@ source_filename = "lib/file2.st"
5656

5757
@mainProg_instance = global %mainProg zeroinitializer, !dbg !0
5858

59-
define void @mainProg(%mainProg* %0) !dbg !10 {
59+
define void @mainProg(%mainProg* %0) section "fn-mainProg:v" !dbg !10 {
6060
entry:
6161
call void @llvm.dbg.declare(metadata %mainProg* %0, metadata !13, metadata !DIExpression()), !dbg !14
6262
ret void, !dbg !14
@@ -85,4 +85,3 @@ attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
8585
!12 = !{null}
8686
!13 = !DILocalVariable(name: "mainProg", scope: !10, file: !2, line: 2, type: !3)
8787
!14 = !DILocation(line: 5, column: 4, scope: !10)
88-

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__multi_files__multiple_files_with_debug_info.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source_filename = "file1.st"
99

1010
@mainProg_instance = external global %mainProg, !dbg !0
1111

12-
define i16 @main() !dbg !10 {
12+
define i16 @main() section "fn-main:i16" !dbg !10 {
1313
entry:
1414
%main = alloca i16, align 2, !dbg !14
1515
call void @llvm.dbg.declare(metadata i16* %main, metadata !15, metadata !DIExpression()), !dbg !17
@@ -19,7 +19,7 @@ entry:
1919
ret i16 %main_ret, !dbg !14
2020
}
2121

22-
declare !dbg !18 void @mainProg(%mainProg*)
22+
declare !dbg !18 void @mainProg(%mainProg*) section "fn-mainProg:v"
2323

2424
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
2525
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
@@ -56,7 +56,7 @@ source_filename = "file2.st"
5656

5757
@mainProg_instance = global %mainProg zeroinitializer, !dbg !0
5858

59-
define void @mainProg(%mainProg* %0) !dbg !10 {
59+
define void @mainProg(%mainProg* %0) section "fn-mainProg:v" !dbg !10 {
6060
entry:
6161
call void @llvm.dbg.declare(metadata %mainProg* %0, metadata !13, metadata !DIExpression()), !dbg !14
6262
ret void, !dbg !14
@@ -85,4 +85,3 @@ attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
8585
!12 = !{null}
8686
!13 = !DILocalVariable(name: "mainProg", scope: !10, file: !2, line: 2, type: !3)
8787
!14 = !DILocation(line: 5, column: 4, scope: !10)
88-

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__multi_files__multiple_source_files_generated.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source_filename = "external_file1.st"
99

1010
@mainProg_instance = external global %mainProg
1111

12-
define i16 @main() {
12+
define i16 @main() section "fn-main:i16" {
1313
entry:
1414
%main = alloca i16, align 2
1515
store i16 0, i16* %main, align 2
@@ -18,7 +18,7 @@ entry:
1818
ret i16 %main_ret
1919
}
2020

21-
declare void @mainProg(%mainProg*)
21+
declare void @mainProg(%mainProg*) section "fn-mainProg:v"
2222

2323
; ModuleID = 'external_file2.st'
2424
source_filename = "external_file2.st"
@@ -27,8 +27,7 @@ source_filename = "external_file2.st"
2727

2828
@mainProg_instance = global %mainProg zeroinitializer
2929

30-
define void @mainProg(%mainProg* %0) {
30+
define void @mainProg(%mainProg* %0) section "fn-mainProg:v" {
3131
entry:
3232
ret void
3333
}
34-

src/codegen/tests/debug_tests/snapshots/rusty__codegen__tests__debug_tests__expression_debugging__aggregate_return_value_variable_in_function.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source_filename = "main"
77

88
@utf08_literal_0 = private unnamed_addr constant [6 x i8] c"hello\00"
99

10-
define void @myFunc([81 x i8]* %0) !dbg !4 {
10+
define void @myFunc([81 x i8]* %0) section "fn-myFunc:s8u81" !dbg !4 {
1111
entry:
1212
%myFunc = alloca [81 x i8]*, align 8, !dbg !8
1313
store [81 x i8]* %0, [81 x i8]** %myFunc, align 8, !dbg !8
@@ -53,4 +53,3 @@ attributes #2 = { argmemonly nofree nounwind willreturn }
5353
!13 = !{!14}
5454
!14 = !DISubrange(count: 80, lowerBound: 0)
5555
!15 = !DILocation(line: 2, column: 17, scope: !4)
56-

src/codegen/tests/debug_tests/snapshots/rusty__codegen__tests__debug_tests__expression_debugging__assignment_statement_have_location.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: result
55
; ModuleID = 'main'
66
source_filename = "main"
77

8-
define i32 @myFunc() !dbg !4 {
8+
define i32 @myFunc() section "fn-myFunc:i32" !dbg !4 {
99
entry:
1010
%myFunc = alloca i32, align 4, !dbg !8
1111
call void @llvm.dbg.declare(metadata i32* %myFunc, metadata !9, metadata !DIExpression()), !dbg !11
@@ -35,4 +35,3 @@ attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
3535
!9 = !DILocalVariable(name: "myFunc", scope: !4, file: !3, line: 2, type: !10, align: 32)
3636
!10 = !DIBasicType(name: "DINT", size: 32, encoding: DW_ATE_signed, flags: DIFlagPublic)
3737
!11 = !DILocation(line: 2, column: 17, scope: !4)
38-

src/codegen/tests/debug_tests/snapshots/rusty__codegen__tests__debug_tests__expression_debugging__case_conditions_location_marked.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: result
55
; ModuleID = 'main'
66
source_filename = "main"
77

8-
define i32 @myFunc() !dbg !4 {
8+
define i32 @myFunc() section "fn-myFunc:i32" !dbg !4 {
99
entry:
1010
%myFunc = alloca i32, align 4, !dbg !8
1111
call void @llvm.dbg.declare(metadata i32* %myFunc, metadata !9, metadata !DIExpression()), !dbg !11
@@ -59,4 +59,3 @@ attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
5959
!14 = !DILocation(line: 5, column: 16, scope: !4)
6060
!15 = !DILocation(line: 7, column: 16, scope: !4)
6161
!16 = !DILocation(line: 11, column: 12, scope: !4)
62-

src/codegen/tests/debug_tests/snapshots/rusty__codegen__tests__debug_tests__expression_debugging__exit_statement_have_location.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: result
55
; ModuleID = 'main'
66
source_filename = "main"
77

8-
define i32 @myFunc() !dbg !4 {
8+
define i32 @myFunc() section "fn-myFunc:i32" !dbg !4 {
99
entry:
1010
%myFunc = alloca i32, align 4, !dbg !8
1111
call void @llvm.dbg.declare(metadata i32* %myFunc, metadata !9, metadata !DIExpression()), !dbg !11
@@ -46,4 +46,3 @@ attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
4646
!11 = !DILocation(line: 2, column: 17, scope: !4)
4747
!12 = !DILocation(line: 3, column: 18, scope: !4)
4848
!13 = !DILocation(line: 6, column: 12, scope: !4)
49-

src/codegen/tests/debug_tests/snapshots/rusty__codegen__tests__debug_tests__expression_debugging__external_impl_is_not_added_as_external_subroutine.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ source_filename = "main"
1111
@myPrg_instance = external global %myPrg, !dbg !0
1212
@__myFb__init = unnamed_addr constant %myFb zeroinitializer, !dbg !5
1313

14-
declare i32 @myFunc()
14+
declare i32 @myFunc() section "fn-myFunc:i32"
1515

16-
declare void @myPrg(%myPrg*)
16+
declare void @myPrg(%myPrg*) section "fn-myPrg:v"
1717

18-
declare void @myFb(%myFb*)
18+
declare void @myFb(%myFb*) section "fn-myFb:v"
1919

2020
!llvm.module.flags = !{!8, !9}
2121
!llvm.dbg.cu = !{!10}
@@ -32,4 +32,3 @@ declare void @myFb(%myFb*)
3232
!9 = !{i32 2, !"Debug Info Version", i32 3}
3333
!10 = distinct !DICompileUnit(language: DW_LANG_C, file: !2, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !11, splitDebugInlining: false)
3434
!11 = !{!0, !5}
35-

0 commit comments

Comments
 (0)