From 466ded8053c08ae37c6588e6b86e77cd60099731 Mon Sep 17 00:00:00 2001 From: ksolana <110843012+ksolana@users.noreply.github.com> Date: Thu, 14 Mar 2024 07:28:11 -0700 Subject: [PATCH] Fix dwarf debug tests Test: cargo test -p move-mv-llvm-compiler --- .../0x1__signer.ll.debug_info.expected | 11 +++++------ .../0x101__M.ll.debug_info.expected | 2 +- .../0x201__M.ll.debug_info.expected | 2 +- .../0x100__M.ll.debug_info.expected | 2 +- .../0x101__vector.ll.debug_info.expected | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/basic-coin-build/0x1__signer.ll.debug_info.expected b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/basic-coin-build/0x1__signer.ll.debug_info.expected index 5d181240593..2f6f8184547 100644 --- a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/basic-coin-build/0x1__signer.ll.debug_info.expected +++ b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/basic-coin-build/0x1__signer.ll.debug_info.expected @@ -27,15 +27,14 @@ entry: declare ptr @move_native_signer_borrow_address(ptr) !llvm.dbg.cu = !{!0} -!address_of = !{!2, !7, !8, !9} +!address_of = !{!2, !6, !7, !8} !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "move-mv-llvm-compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/") !1 = !DIFile(filename: "signer.move", directory: "/language/move-stdlib/sources") -!2 = distinct !DISubprogram(name: "address_of", linkageName: "address_of", scope: !1, file: !1, line: 11, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !6) +!2 = distinct !DISubprogram(name: "address_of", linkageName: "address_of", scope: !1, file: !1, line: 11, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "unspecified type") -!6 = !{} -!7 = distinct !DILexicalBlock(scope: !2, file: !1, line: 10) -!8 = !DINamespace(name: "address_of", scope: !1) -!9 = !DILocation(line: 11, column: 4, scope: !7) +!6 = distinct !DILexicalBlock(scope: !2, file: !1, line: 10) +!7 = !DINamespace(name: "address_of", scope: !1) +!8 = !DILocation(line: 11, column: 4, scope: !6) diff --git a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x101__M.ll.debug_info.expected b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x101__M.ll.debug_info.expected index f098df8bf6a..5f397aed45d 100644 --- a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x101__M.ll.debug_info.expected +++ b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x101__M.ll.debug_info.expected @@ -63,7 +63,7 @@ entry: !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "move-mv-llvm-compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/") !1 = !DIFile(filename: "dwarf-struct-2-modules.move", directory: "/language/tools/move-mv-llvm-compiler/tests/dwarf-tests") -!2 = distinct !DISubprogram(name: "fun_1", linkageName: "fun_1", scope: !1, file: !1, line: 33, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!2 = distinct !DISubprogram(name: "fun_1", linkageName: "fun_1", scope: !1, file: !1, line: 33, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !3 = !DISubroutineType(types: !4) !4 = !{} !5 = distinct !DILexicalBlock(scope: !2, file: !1, line: 5) diff --git a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x201__M.ll.debug_info.expected b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x201__M.ll.debug_info.expected index 81f87866467..89b410d0b0c 100644 --- a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x201__M.ll.debug_info.expected +++ b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-2-modules-build/0x201__M.ll.debug_info.expected @@ -36,7 +36,7 @@ declare %struct.M__MyStruct @"0000000000000101_M_fun_1_AcLtMspYikxikv"() !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "move-mv-llvm-compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/") !1 = !DIFile(filename: "dwarf-struct-2-modules.move", directory: "/language/tools/move-mv-llvm-compiler/tests/dwarf-tests") -!2 = distinct !DISubprogram(name: "fun_2", linkageName: "fun_2", scope: !1, file: !1, line: 7, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!2 = distinct !DISubprogram(name: "fun_2", linkageName: "fun_2", scope: !1, file: !1, line: 7, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !3 = !DISubroutineType(types: !4) !4 = !{} !5 = distinct !DILexicalBlock(scope: !2, file: !1, line: 5) diff --git a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-build/0x100__M.ll.debug_info.expected b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-build/0x100__M.ll.debug_info.expected index 0239cca6a55..b5402296b85 100644 --- a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-build/0x100__M.ll.debug_info.expected +++ b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-struct-build/0x100__M.ll.debug_info.expected @@ -63,7 +63,7 @@ entry: !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "move-mv-llvm-compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/") !1 = !DIFile(filename: "dwarf-struct.move", directory: "/language/tools/move-mv-llvm-compiler/tests/dwarf-tests") -!2 = distinct !DISubprogram(name: "fun_1", linkageName: "fun_1", scope: !1, file: !1, line: 16, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!2 = distinct !DISubprogram(name: "fun_1", linkageName: "fun_1", scope: !1, file: !1, line: 16, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !3 = !DISubroutineType(types: !4) !4 = !{} !5 = distinct !DILexicalBlock(scope: !2, file: !1, line: 5) diff --git a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-vector-build/0x101__vector.ll.debug_info.expected b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-vector-build/0x101__vector.ll.debug_info.expected index ab55f0893ae..36700eb3ae8 100644 --- a/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-vector-build/0x101__vector.ll.debug_info.expected +++ b/language/tools/move-mv-llvm-compiler/tests/dwarf-tests/dwarf-vector-build/0x101__vector.ll.debug_info.expected @@ -199,7 +199,7 @@ attributes #0 = { cold noreturn } !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "move-mv-llvm-compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/") !1 = !DIFile(filename: "dwarf-vector.move", directory: "/language/tools/move-mv-llvm-compiler/tests/dwarf-tests") -!2 = distinct !DISubprogram(name: "test_singleton_contains", linkageName: "test_singleton_contains", scope: !1, file: !1, line: 17, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!2 = distinct !DISubprogram(name: "test_singleton_contains", linkageName: "test_singleton_contains", scope: !1, file: !1, line: 17, type: !3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !3 = !DISubroutineType(types: !4) !4 = !{} !5 = distinct !DILexicalBlock(scope: !2, file: !1, line: 23) @@ -222,13 +222,13 @@ attributes #0 = { cold noreturn } !22 = !{!23} !23 = !DIDerivedType(tag: DW_TAG_member, name: "foo", scope: !21, file: !1, line: 3, baseType: !9, size: 128, align: 64) !24 = !DICompositeType(tag: DW_TAG_array_type, baseType: !20, size: 192, align: 8, flags: DIFlagVector, elements: !17) -!25 = distinct !DISubprogram(name: "singleton", linkageName: "singleton", scope: !1, file: !1, line: 11, type: !26, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!25 = distinct !DISubprogram(name: "singleton", linkageName: "singleton", scope: !1, file: !1, line: 11, type: !26, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !26 = !DISubroutineType(types: !27) !27 = !{!9} !28 = distinct !DILexicalBlock(scope: !25, file: !1, line: 9) !29 = !DINamespace(name: "singleton", scope: !1) !30 = !DILocation(line: 11, column: 4, scope: !28) -!31 = distinct !DISubprogram(name: "singleton", linkageName: "singleton", scope: !1, file: !1, line: 11, type: !32, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4) +!31 = distinct !DISubprogram(name: "singleton", linkageName: "singleton", scope: !1, file: !1, line: 11, type: !32, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0) !32 = !DISubroutineType(types: !33) !33 = !{!20} !34 = distinct !DILexicalBlock(scope: !31, file: !1, line: 9)