From 88b3605eac7cf0a7f4ec163ce150103b90da24a4 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 16 Jun 2026 13:18:05 +1000 Subject: [PATCH] Fix #7289: Add debug info module flags as-needed and verify if already present (#7336) This avoids duplicate module flags when compiling C++ interop with debug info. Assisted-by: Gemini via Antigravity --- .../optimize/clang_no_optimize_twice.carbon | 14 +- .../compile/optimize/optimize_debug.carbon | 24 +- .../compile/optimize/optimize_default.carbon | 24 +- .../compile/optimize/optimize_none.carbon | 28 +- .../compile/optimize/optimize_size.carbon | 28 +- .../compile/optimize/optimize_speed.carbon | 24 +- toolchain/driver/testdata/stdin.carbon | 12 +- toolchain/lower/context.cpp | 25 +- toolchain/lower/testdata/alias/var.carbon | 16 +- .../testdata/array/array_in_place.carbon | 20 +- .../testdata/array/assign_return_value.carbon | 22 +- toolchain/lower/testdata/array/base.carbon | 28 +- toolchain/lower/testdata/array/field.carbon | 18 +- .../testdata/array/function_param.carbon | 20 +- toolchain/lower/testdata/array/global.carbon | 16 +- toolchain/lower/testdata/array/iterate.carbon | 56 ++-- toolchain/lower/testdata/array/layout.carbon | 34 +-- toolchain/lower/testdata/basics/empty.carbon | 12 +- toolchain/lower/testdata/builtins/bool.carbon | 18 +- toolchain/lower/testdata/builtins/char.carbon | 18 +- toolchain/lower/testdata/builtins/cpp.carbon | 18 +- .../lower/testdata/builtins/float.carbon | 74 +++--- .../testdata/builtins/float_to_float.carbon | 18 +- .../testdata/builtins/float_to_int.carbon | 24 +- toolchain/lower/testdata/builtins/int.carbon | 194 +++++++------- .../testdata/builtins/int_literal.carbon | 20 +- .../testdata/builtins/int_to_float.carbon | 24 +- .../testdata/builtins/maybe_unformed.carbon | 40 +-- .../builtins/method_vs_nonmethod.carbon | 16 +- .../lower/testdata/builtins/no_op.carbon | 20 +- .../builtins/overloaded_operator.carbon | 14 +- .../lower/testdata/builtins/pointer.carbon | 16 +- .../lower/testdata/builtins/print_read.carbon | 14 +- .../lower/testdata/builtins/types.carbon | 14 +- toolchain/lower/testdata/builtins/uint.carbon | 48 ++-- toolchain/lower/testdata/choice/basic.carbon | 16 +- toolchain/lower/testdata/class/adapt.carbon | 44 ++-- toolchain/lower/testdata/class/base.carbon | 18 +- toolchain/lower/testdata/class/basic.carbon | 20 +- toolchain/lower/testdata/class/convert.carbon | 24 +- toolchain/lower/testdata/class/field.carbon | 66 ++--- .../testdata/class/field_initializer.carbon | 14 +- toolchain/lower/testdata/class/generic.carbon | 100 +++---- toolchain/lower/testdata/class/import.carbon | 26 +- toolchain/lower/testdata/class/method.carbon | 14 +- toolchain/lower/testdata/class/self.carbon | 16 +- toolchain/lower/testdata/class/static.carbon | 36 +-- .../lower/testdata/class/value_access.carbon | 14 +- toolchain/lower/testdata/class/virtual.carbon | 246 +++++++++--------- toolchain/lower/testdata/for/bindings.carbon | 48 ++-- .../lower/testdata/for/break_continue.carbon | 58 ++--- toolchain/lower/testdata/for/for.carbon | 58 ++--- .../function/call/empty_struct.carbon | 16 +- .../testdata/function/call/empty_tuple.carbon | 16 +- .../lower/testdata/function/call/form.carbon | 90 +++---- .../lower/testdata/function/call/i32.carbon | 18 +- .../call/implicit_empty_tuple_as_arg.carbon | 18 +- .../testdata/function/call/params_one.carbon | 16 +- .../function/call/params_one_comma.carbon | 16 +- .../testdata/function/call/params_two.carbon | 16 +- .../function/call/params_two_comma.carbon | 16 +- .../testdata/function/call/params_zero.carbon | 16 +- .../testdata/function/call/ref_param.carbon | 18 +- .../testdata/function/call/ref_return.carbon | 18 +- .../function/call/return_implicit.carbon | 16 +- .../function/call/struct_param.carbon | 16 +- .../testdata/function/call/tuple_param.carbon | 16 +- .../call/tuple_param_with_return_slot.carbon | 20 +- .../testdata/function/call/var_param.carbon | 18 +- .../function/declaration/simple.carbon | 14 +- .../function/definition/destroy.carbon | 58 ++--- .../function/definition/empty_struct.carbon | 14 +- .../function/definition/eval_musteval.carbon | 32 +-- .../function/definition/params_one.carbon | 14 +- .../function/definition/params_two.carbon | 14 +- .../function/definition/params_zero.carbon | 14 +- .../function/definition/raw_name.carbon | 14 +- .../function/definition/var_param.carbon | 28 +- .../testdata/function/generic/call.carbon | 30 +-- .../function/generic/call_basic.carbon | 40 +-- .../function/generic/call_basic_depth.carbon | 22 +- .../function/generic/call_dedup_ptr.carbon | 16 +- .../function/generic/call_deref_ptr.carbon | 32 +-- .../call_different_associated_const.carbon | 18 +- .../generic/call_different_impls.carbon | 22 +- .../call_different_impls_with_const.carbon | 24 +- .../generic/call_different_specific.carbon | 32 +-- .../generic/call_impl_function.carbon | 18 +- .../function/generic/call_method.carbon | 20 +- .../generic/call_recursive_basic.carbon | 30 +-- .../generic/call_recursive_diamond.carbon | 42 +-- .../generic/call_recursive_impl.carbon | 22 +- .../generic/call_recursive_mutual.carbon | 30 +-- .../generic/call_recursive_reorder.carbon | 20 +- .../call_recursive_reorder_more.carbon | 36 +-- .../generic/call_recursive_sccs_deep.carbon | 60 ++--- .../generic/call_specific_in_class.carbon | 44 ++-- ...ross_library_name_collision_private.carbon | 44 ++-- .../testdata/function/generic/import.carbon | 48 ++-- .../generic/import_core_witness.carbon | 30 +-- .../function/generic/import_unused_def.carbon | 34 +-- .../function/generic/local_function.carbon | 18 +- .../function/generic/reverse_canonical.carbon | 32 +-- .../function/generic/self_canonical.carbon | 22 +- .../function/generic/type_param.carbon | 12 +- .../generic/type_representation.carbon | 52 ++-- .../lower/testdata/global/class_obj.carbon | 14 +- .../testdata/global/class_with_fun.carbon | 16 +- toolchain/lower/testdata/global/decl.carbon | 14 +- .../lower/testdata/global/simple_init.carbon | 14 +- .../testdata/global/simple_with_fun.carbon | 16 +- toolchain/lower/testdata/global/use.carbon | 16 +- toolchain/lower/testdata/if/else.carbon | 20 +- toolchain/lower/testdata/if/no_else.carbon | 18 +- toolchain/lower/testdata/if_expr/basic.carbon | 18 +- .../lower/testdata/if_expr/empty_block.carbon | 14 +- .../lower/testdata/impl/assoc_fn_alias.carbon | 16 +- .../lower/testdata/impl/extend_impl.carbon | 18 +- toolchain/lower/testdata/impl/impl.carbon | 54 ++-- toolchain/lower/testdata/impl/import.carbon | 28 +- .../lower/testdata/impl/import_facet.carbon | 56 ++-- .../lower/testdata/impl/import_thunk.carbon | 88 +++---- .../testdata/impl/instance_method.carbon | 16 +- .../lower/testdata/impl/period_self.carbon | 30 +-- toolchain/lower/testdata/impl/thunk.carbon | 56 ++-- .../index/array_element_access.carbon | 24 +- .../lower/testdata/interface/assoc.carbon | 14 +- .../lower/testdata/interface/basic.carbon | 16 +- .../interface/mangle_declared_class.carbon | 16 +- .../lower/testdata/interface/where.carbon | 32 +-- .../lower/testdata/interop/cpp/array.carbon | 16 +- .../cpp/clang_code_generator_callbacks.carbon | 12 +- .../interop/cpp/class/export/class.carbon | 74 +++--- .../interop/cpp/class/export/mangle.carbon | 24 +- .../interop/cpp/class/export/method.carbon | 64 ++--- .../interop/cpp/class/import/alignment.carbon | 30 +-- .../interop/cpp/class/import/base.carbon | 44 ++-- .../cpp/class/import/constructor.carbon | 108 ++++---- .../cpp/class/import/conversion.carbon | 50 ++-- .../cpp/class/import/copy_vs_move.carbon | 62 ++--- .../interop/cpp/class/import/dynamic.carbon | 28 +- .../interop/cpp/class/import/field.carbon | 80 +++--- .../interop/cpp/class/import/method.carbon | 72 ++--- .../cpp/class/import/virtual_base.carbon | 16 +- .../interop/cpp/class/virtual_fn.carbon | 30 +-- .../interop/cpp/cpp_compat_int.carbon | 20 +- .../testdata/interop/cpp/debug_info.carbon | 70 +++++ .../lower/testdata/interop/cpp/enum.carbon | 46 ++-- .../testdata/interop/cpp/extern_c.carbon | 70 ++--- .../cpp/function/export/function.carbon | 62 ++--- .../cpp/function/import/cpp_run.carbon | 14 +- .../cpp/function/import/function_decl.carbon | 86 +++--- .../import/function_in_template.carbon | 14 +- .../cpp/function/import/import_inline.carbon | 16 +- .../cpp/function/import/parameters.carbon | 62 ++--- .../interop/cpp/function/import/return.carbon | 80 +++--- .../lower/testdata/interop/cpp/globals.carbon | 90 +++---- .../testdata/interop/cpp/issue7142.carbon | 22 +- .../lower/testdata/interop/cpp/nullptr.carbon | 40 +-- .../testdata/interop/cpp/operators.carbon | 44 ++-- .../lower/testdata/interop/cpp/pointer.carbon | 102 ++++---- .../testdata/interop/cpp/reference.carbon | 68 ++--- .../interop/cpp/std_initializer_list.carbon | 48 ++-- .../testdata/interop/cpp/template.carbon | 54 ++-- .../lower/testdata/interop/cpp/thunks.carbon | 54 ++-- .../lower/testdata/interop/cpp/void.carbon | 72 ++--- .../lower/testdata/let/copy_value_rep.carbon | 20 +- toolchain/lower/testdata/let/global.carbon | 16 +- toolchain/lower/testdata/let/local.carbon | 30 +-- toolchain/lower/testdata/let/tuple.carbon | 20 +- .../lower/testdata/namespace/function.carbon | 18 +- .../testdata/namespace/namespace_run.carbon | 16 +- .../lower/testdata/namespace/nested.carbon | 16 +- toolchain/lower/testdata/operators/and.carbon | 18 +- .../testdata/operators/and_empty_block.carbon | 14 +- .../testdata/operators/arithmetic.carbon | 40 +-- .../testdata/operators/assignment.carbon | 20 +- .../lower/testdata/operators/increment.carbon | 24 +- toolchain/lower/testdata/operators/not.carbon | 14 +- toolchain/lower/testdata/operators/or.carbon | 18 +- .../testdata/operators/or_empty_block.carbon | 14 +- .../testdata/operators/overloaded.carbon | 22 +- .../testdata/operators/string_indexing.carbon | 16 +- .../packages/cross_package_call.carbon | 36 +-- .../packages/imported_package_mangle.carbon | 58 ++--- .../imported_package_mangle_string.carbon | 30 +-- .../imported_type_completeness.carbon | 100 +++---- .../packages/private_external_mangle.carbon | 50 ++-- .../separate_compilation_witness.carbon | 178 ++++++------- .../testdata/pointer/address_of_field.carbon | 18 +- .../testdata/pointer/address_of_unused.carbon | 16 +- toolchain/lower/testdata/pointer/basic.carbon | 18 +- .../lower/testdata/pointer/convert.carbon | 14 +- .../pointer/pointer_to_pointer.carbon | 14 +- .../lower/testdata/primitives/bool.carbon | 18 +- .../lower/testdata/primitives/char.carbon | 112 ++++---- .../testdata/primitives/char_literals.carbon | 48 ++-- .../testdata/primitives/int_types.carbon | 82 +++--- .../primitives/numeric_literals.carbon | 22 +- .../lower/testdata/primitives/optional.carbon | 134 +++++----- .../lower/testdata/primitives/string.carbon | 20 +- .../testdata/primitives/type_values.carbon | 18 +- .../lower/testdata/primitives/zero.carbon | 14 +- .../testdata/return/code_after_return.carbon | 16 +- .../function_ids_in_different_files.carbon | 28 +- .../testdata/return/no_return_from_run.carbon | 16 +- .../lower/testdata/return/no_value.carbon | 14 +- .../lower/testdata/return/return_var.carbon | 14 +- .../testdata/return/return_var_byval.carbon | 16 +- toolchain/lower/testdata/return/value.carbon | 14 +- toolchain/lower/testdata/return/var.carbon | 16 +- toolchain/lower/testdata/struct/empty.carbon | 14 +- toolchain/lower/testdata/struct/layout.carbon | 96 +++---- .../testdata/struct/member_access.carbon | 20 +- .../testdata/struct/nested_struct.carbon | 14 +- .../struct/nested_struct_in_place.carbon | 20 +- .../lower/testdata/struct/one_entry.carbon | 18 +- .../testdata/struct/partially_const.carbon | 14 +- .../lower/testdata/struct/two_entries.carbon | 18 +- .../tuple/access/element_access.carbon | 18 +- .../tuple/access/return_value_access.carbon | 20 +- toolchain/lower/testdata/tuple/empty.carbon | 14 +- .../lower/testdata/tuple/nested_tuple.carbon | 14 +- .../tuple/nested_tuple_in_place.carbon | 20 +- .../lower/testdata/tuple/one_entry.carbon | 18 +- .../lower/testdata/tuple/two_entries.carbon | 18 +- .../testdata/tuple/value_formation.carbon | 18 +- .../testdata/tuple/value_forwarding.carbon | 14 +- toolchain/lower/testdata/var/export.carbon | 16 +- toolchain/lower/testdata/var/global.carbon | 80 +++--- toolchain/lower/testdata/var/import.carbon | 62 ++--- toolchain/lower/testdata/var/local.carbon | 36 +-- toolchain/lower/testdata/var/nested.carbon | 16 +- toolchain/lower/testdata/var/param.carbon | 32 +-- .../lower/testdata/var/uninitialized.carbon | 18 +- .../testdata/while/break_continue.carbon | 14 +- .../lower/testdata/while/preheader.carbon | 14 +- .../testdata/while/unreachable_end.carbon | 14 +- toolchain/lower/testdata/while/while.carbon | 14 +- 239 files changed, 3975 insertions(+), 3888 deletions(-) create mode 100644 toolchain/lower/testdata/interop/cpp/debug_info.carbon diff --git a/toolchain/driver/testdata/compile/optimize/clang_no_optimize_twice.carbon b/toolchain/driver/testdata/compile/optimize/clang_no_optimize_twice.carbon index b8768a3924a9..354c9b54df0f 100644 --- a/toolchain/driver/testdata/compile/optimize/clang_no_optimize_twice.carbon +++ b/toolchain/driver/testdata/compile/optimize/clang_no_optimize_twice.carbon @@ -57,22 +57,22 @@ fn Call() -> i32 { // CHECK:STDOUT: attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { noinline nounwind optnone } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon index 4194401e3da8..2fec9863c6b0 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon @@ -92,26 +92,26 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "foo.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 10, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !13 = distinct !DILocation(line: 12, column: 10, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 19, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !3, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !1, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null, !19} // CHECK:STDOUT: !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -120,7 +120,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 5, scope: !16) // CHECK:STDOUT: !24 = !DILocation(line: 331, column: 3, scope: !25, inlinedAt: !32) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !26, line: 331, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !26, line: 331, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !7, !7} @@ -128,7 +128,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !31 = !DILocalVariable(arg: 2, scope: !25, type: !7) // CHECK:STDOUT: !32 = distinct !DILocation(line: 398, column: 5, scope: !33, inlinedAt: !38) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !26, line: 396, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !26, line: 396, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !34 = !DISubroutineType(types: !35) // CHECK:STDOUT: !35 = !{null, !7} // CHECK:STDOUT: !36 = !{!37} @@ -136,7 +136,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = distinct !DILocation(line: 20, column: 5, scope: !16) // CHECK:STDOUT: !39 = !DILocation(line: 18, column: 10, scope: !16) // CHECK:STDOUT: !40 = !DILocation(line: 15, column: 1, scope: !16) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 17, column: 3, scope: !41) diff --git a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon index 187b9239e300..d2bde3b03f84 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon @@ -92,26 +92,26 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "foo.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 10, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !13 = distinct !DILocation(line: 12, column: 10, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 19, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !3, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !1, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null, !19} // CHECK:STDOUT: !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -120,7 +120,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 5, scope: !16) // CHECK:STDOUT: !24 = !DILocation(line: 331, column: 3, scope: !25, inlinedAt: !32) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !26, line: 331, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !26, line: 331, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !7, !7} @@ -128,7 +128,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !31 = !DILocalVariable(arg: 2, scope: !25, type: !7) // CHECK:STDOUT: !32 = distinct !DILocation(line: 398, column: 5, scope: !33, inlinedAt: !38) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !26, line: 396, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !26, line: 396, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !34 = !DISubroutineType(types: !35) // CHECK:STDOUT: !35 = !{null, !7} // CHECK:STDOUT: !36 = !{!37} @@ -136,7 +136,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = distinct !DILocation(line: 20, column: 5, scope: !16) // CHECK:STDOUT: !39 = !DILocation(line: 18, column: 10, scope: !16) // CHECK:STDOUT: !40 = !DILocation(line: 15, column: 1, scope: !16) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 17, column: 3, scope: !41) diff --git a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon index 6fed1c2ef32f..622610a1c578 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon @@ -121,24 +121,24 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #0 = { noinline nounwind optnone } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "foo.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 12, column: 10, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 12, column: 3, scope: !11) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !3, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !1, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -152,19 +152,19 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 5, scope: !14) // CHECK:STDOUT: !26 = !DILocation(line: 18, column: 3, scope: !14) // CHECK:STDOUT: !27 = !DILocation(line: 15, column: 1, scope: !14) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !7} // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !7) // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !35, line: 396, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !35, line: 396, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !35 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 398, column: 5, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 396, column: 3, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !35, line: 331, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !35, line: 331, type: !41, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !41 = !DISubroutineType(types: !42) // CHECK:STDOUT: !42 = !{null, !7, !7} // CHECK:STDOUT: !43 = !{!44, !45} @@ -172,14 +172,14 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !45 = !DILocalVariable(arg: 2, scope: !40, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 0, scope: !40) // CHECK:STDOUT: !47 = !DILocation(line: 331, column: 3, scope: !40) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !35, line: 64, type: !49, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !35, line: 64, type: !49, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !49 = !DISubroutineType(types: !50) // CHECK:STDOUT: !50 = !{!7, !7} // CHECK:STDOUT: !51 = !{!52} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !48, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 66, column: 17, scope: !48) // CHECK:STDOUT: !54 = !DILocation(line: 66, column: 5, scope: !48) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !35, line: 59, type: !49, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !35, line: 59, type: !49, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocation(line: 59, column: 28, scope: !55) diff --git a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon index b884cd10f34b..ccc22f929c49 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon @@ -121,24 +121,24 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline minsize nounwind optsize } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "foo.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 12, column: 10, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 12, column: 3, scope: !11) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !3, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !1, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -152,19 +152,19 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 5, scope: !14) // CHECK:STDOUT: !26 = !DILocation(line: 18, column: 3, scope: !14) // CHECK:STDOUT: !27 = !DILocation(line: 15, column: 1, scope: !14) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !7} // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !7) // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !35, line: 396, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !35, line: 396, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !35 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 398, column: 5, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 396, column: 3, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !35, line: 331, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !35, line: 331, type: !41, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !41 = !DISubroutineType(types: !42) // CHECK:STDOUT: !42 = !{null, !7, !7} // CHECK:STDOUT: !43 = !{!44, !45} @@ -172,14 +172,14 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !45 = !DILocalVariable(arg: 2, scope: !40, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 0, scope: !40) // CHECK:STDOUT: !47 = !DILocation(line: 331, column: 3, scope: !40) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !35, line: 64, type: !49, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !35, line: 64, type: !49, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !49 = !DISubroutineType(types: !50) // CHECK:STDOUT: !50 = !{!7, !7} // CHECK:STDOUT: !51 = !{!52} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !48, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 66, column: 17, scope: !48) // CHECK:STDOUT: !54 = !DILocation(line: 66, column: 5, scope: !48) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !35, line: 59, type: !49, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !35, line: 59, type: !49, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocation(line: 59, column: 28, scope: !55) diff --git a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon index ea4cc75a1552..7457e1e34407 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon @@ -108,26 +108,26 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "foo.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "foo.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 10, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !13 = distinct !DILocation(line: 12, column: 10, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 19, scope: !4, inlinedAt: !13) // CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !3, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !1, line: 15, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null, !19} // CHECK:STDOUT: !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -135,7 +135,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !16, type: !19) // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 9, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 331, column: 3, scope: !24, inlinedAt: !31) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !25, line: 331, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !25, line: 331, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !25 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !7, !7} @@ -143,7 +143,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !24, type: !7) // CHECK:STDOUT: !30 = !DILocalVariable(arg: 2, scope: !24, type: !7) // CHECK:STDOUT: !31 = distinct !DILocation(line: 398, column: 5, scope: !32, inlinedAt: !37) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !25, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !25, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !33 = !DISubroutineType(types: !34) // CHECK:STDOUT: !34 = !{null, !7} // CHECK:STDOUT: !35 = !{!36} @@ -154,7 +154,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !40 = !{!"llvm.loop.isvectorized", i32 1} // CHECK:STDOUT: !41 = !{!"llvm.loop.unroll.runtime.disable"} // CHECK:STDOUT: !42 = !DILocation(line: 15, column: 1, scope: !16) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 17, column: 3, scope: !43) diff --git a/toolchain/driver/testdata/stdin.carbon b/toolchain/driver/testdata/stdin.carbon index 22160319ca72..8ac238950e89 100644 --- a/toolchain/driver/testdata/stdin.carbon +++ b/toolchain/driver/testdata/stdin.carbon @@ -105,10 +105,10 @@ // CHECK:STDOUT: ; ModuleID = '-' // CHECK:STDOUT: source_filename = "-" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "-", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "-", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/toolchain/lower/context.cpp b/toolchain/lower/context.cpp index bc805a0b5ab5..4b01daa48251 100644 --- a/toolchain/lower/context.cpp +++ b/toolchain/lower/context.cpp @@ -9,12 +9,26 @@ #include "common/growing_range.h" #include "common/raw_string_ostream.h" #include "common/vlog.h" +#include "llvm/IR/Metadata.h" #include "llvm/Transforms/Utils/ModuleUtils.h" #include "toolchain/lower/file_context.h" #include "toolchain/sem_ir/inst_namer.h" namespace Carbon::Lower { +static auto CheckOrAddModuleFlag(llvm::Module& llvm_module, + llvm::Module::ModFlagBehavior behavior, + llvm::StringRef key, uint32_t value) -> void { + if (auto* flag = llvm_module.getModuleFlag(key)) { + CARBON_CHECK(llvm::cast( + llvm::cast(flag)->getValue()) + ->getZExtValue() == value, + "Module flag mismatch for {0}", key); + } else { + llvm_module.addModuleFlag(behavior, key, value); + } +} + Context::Context( llvm::LLVMContext* llvm_context, llvm::IntrusiveRefCntPtr fs, bool want_debug_info, @@ -74,18 +88,21 @@ auto Context::Finalize() && -> std::unique_ptr { } } + if (di_compile_unit_) { + CheckOrAddModuleFlag(*llvm_module_, llvm::Module::Max, "Dwarf Version", 5); + CheckOrAddModuleFlag(*llvm_module_, llvm::Module::Warning, + "Debug Info Version", llvm::DEBUG_METADATA_VERSION); + } + return clang_code_generator_ ? std::unique_ptr( clang_code_generator_->ReleaseModule()) : std::move(llvm_module_owner_); } auto Context::BuildDICompileUnit(llvm::StringRef module_name, - llvm::Module& llvm_module, + llvm::Module& /*llvm_module*/, llvm::DIBuilder& di_builder) -> llvm::DICompileUnit* { - llvm_module.addModuleFlag(llvm::Module::Max, "Dwarf Version", 5); - llvm_module.addModuleFlag(llvm::Module::Warning, "Debug Info Version", - llvm::DEBUG_METADATA_VERSION); // TODO: Include directory path in the compile_unit_file. llvm::DIFile* compile_unit_file = di_builder.createFile(module_name, ""); // TODO: Introduce a new language code for Carbon. C++ works well for now diff --git a/toolchain/lower/testdata/alias/var.carbon b/toolchain/lower/testdata/alias/var.carbon index 263ffad6bc1f..9a457a2080c5 100644 --- a/toolchain/lower/testdata/alias/var.carbon +++ b/toolchain/lower/testdata/alias/var.carbon @@ -39,20 +39,20 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 17, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !11, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !11, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null} // CHECK:STDOUT: !13 = !DILocation(line: 13, column: 1, scope: !10) diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index dde3db936297..3918aa519f6b 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -58,14 +58,14 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "array_in_place.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "array_in_place.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -73,21 +73,21 @@ fn G() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 39, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 16, column: 44, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 16, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.50f28ea90d1c1a11:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.50f28ea90d1c1a11:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !22) // CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !26) diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index 89134185ad2c..981226c360f3 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -81,39 +81,39 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "assign_return_value.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assign_return_value.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // 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) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !10) // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 26, scope: !10) // CHECK:STDOUT: !16 = !DILocation(line: 15, column: 1, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !13} // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !17, type: !13) // CHECK:STDOUT: !22 = !DILocation(line: 16, column: 26, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !7} // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !23, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 16, column: 26, scope: !23) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a830cda2fcf179ac:core.Destroy.Core", scope: null, file: !3, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a830cda2fcf179ac:core.Destroy.Core", scope: null, file: !1, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !7) // CHECK:STDOUT: !32 = !DILocation(line: 16, column: 3, scope: !29) diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index 65b6dd2b6bb3..db8c6a35fa72 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -129,14 +129,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "base.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "base.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -151,36 +151,36 @@ fn Run() { // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 28, scope: !4) // CHECK:STDOUT: !17 = !DILocation(line: 18, column: 26, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !7} // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 18, column: 3, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !3, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !1, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !28} // CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28) // CHECK:STDOUT: !31 = !DILocation(line: 18, column: 3, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 17, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 17, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !28) // CHECK:STDOUT: !35 = !DILocation(line: 17, column: 3, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd2b1e64e898d326:core.Destroy.Core", scope: null, file: !3, line: 16, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd2b1e64e898d326:core.Destroy.Core", scope: null, file: !1, line: 16, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !37 = !{!38} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !36, type: !28) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !36) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 15, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 15, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !28) // CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !40) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.deb57d70fc43a64e:core.Destroy.Core", scope: null, file: !3, line: 15, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.deb57d70fc43a64e:core.Destroy.Core", scope: null, file: !1, line: 15, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !28) // CHECK:STDOUT: !47 = !DILocation(line: 15, column: 3, scope: !44) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de24b55dde9ac900:core.Destroy.Core", scope: null, file: !3, line: 14, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de24b55dde9ac900:core.Destroy.Core", scope: null, file: !1, line: 14, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !49 = !{!50} // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !48, type: !28) // CHECK:STDOUT: !51 = !DILocation(line: 14, column: 3, scope: !48) diff --git a/toolchain/lower/testdata/array/field.carbon b/toolchain/lower/testdata/array/field.carbon index 159bec8ced65..bd3df1c696e5 100644 --- a/toolchain/lower/testdata/array/field.carbon +++ b/toolchain/lower/testdata/array/field.carbon @@ -67,21 +67,21 @@ class A { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "field.carbon", directory: "") -// 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: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "field.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Init", linkageName: "_CInit.A.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // 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) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.A.Main", scope: null, file: !3, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.A.Main", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !7} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -89,7 +89,7 @@ class A { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 12, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 5, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.A.Main", scope: null, file: !3, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.A.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 23, column: 5, scope: !19) diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index c21bb211130a..be0704e345b6 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -63,14 +63,14 @@ fn G() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "function_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "function_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -80,19 +80,19 @@ fn G() -> i32 { // CHECK:STDOUT: !11 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !12 = !DILocation(line: 14, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{!7} // CHECK:STDOUT: !17 = !DILocation(line: 18, column: 12, scope: !14) // CHECK:STDOUT: !18 = !DILocation(line: 18, column: 10, scope: !14) // CHECK:STDOUT: !19 = !DILocation(line: 18, column: 3, scope: !14) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !7} // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !25 = !DILocation(line: 18, column: 12, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !3, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !1, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !8} // CHECK:STDOUT: !29 = !{!30} diff --git a/toolchain/lower/testdata/array/global.carbon b/toolchain/lower/testdata/array/global.carbon index 237e5dba4e3e..be5a15563752 100644 --- a/toolchain/lower/testdata/array/global.carbon +++ b/toolchain/lower/testdata/array/global.carbon @@ -45,19 +45,19 @@ fn Get() -> ref array(i32, 4) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "global_array_reference.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "global_array_reference.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DILocation(line: 3, column: 1, scope: !9) diff --git a/toolchain/lower/testdata/array/iterate.carbon b/toolchain/lower/testdata/array/iterate.carbon index 3519397c6b14..60a4dc2273ae 100644 --- a/toolchain/lower/testdata/array/iterate.carbon +++ b/toolchain/lower/testdata/array/iterate.carbon @@ -223,14 +223,14 @@ fn F() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "iterate.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "iterate.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 26, scope: !4) @@ -238,48 +238,48 @@ fn F() { // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 5, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 3, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 17, column: 7, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 17, column: 7, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !15) // CHECK:STDOUT: !29 = !DILocation(line: 17, column: 7, scope: !26) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !22) // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 7, scope: !30) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f49c06ba556be406:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f49c06ba556be406:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !22) // CHECK:STDOUT: !37 = !DILocation(line: 17, column: 7, scope: !34) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab782c7eec490fc7:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab782c7eec490fc7:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !22) // CHECK:STDOUT: !41 = !DILocation(line: 17, column: 7, scope: !38) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3a5df7cec745952b:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3a5df7cec745952b:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !43 = !{!44} // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !42, type: !22) // CHECK:STDOUT: !45 = !DILocation(line: 16, column: 26, scope: !42) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.e163a239f9fa927c:Iterate.Core.620427d555024fe2", scope: null, file: !47, line: 23, type: !48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.e163a239f9fa927c:Iterate.Core.620427d555024fe2", scope: null, file: !47, line: 23, type: !48, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !47 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") // CHECK:STDOUT: !48 = !DISubroutineType(types: !49) // CHECK:STDOUT: !49 = !{!15, !22} // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !46, type: !22) // CHECK:STDOUT: !52 = !DILocation(line: 23, column: 38, scope: !46) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.e163a239f9fa927c:Iterate.Core.620427d555024fe2", scope: null, file: !47, line: 24, type: !54, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.e163a239f9fa927c:Iterate.Core.620427d555024fe2", scope: null, file: !47, line: 24, type: !54, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !54 = !DISubroutineType(types: !55) // CHECK:STDOUT: !55 = !{!22, !22, !22} // CHECK:STDOUT: !56 = !{!57, !58} @@ -294,7 +294,7 @@ fn F() { // CHECK:STDOUT: !65 = !DILocation(line: 27, column: 7, scope: !53) // CHECK:STDOUT: !66 = !DILocation(line: 29, column: 14, scope: !53) // CHECK:STDOUT: !67 = !DILocation(line: 29, column: 7, scope: !53) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 36, type: !70, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 36, type: !70, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !72) // CHECK:STDOUT: !69 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !70 = !DISubroutineType(types: !71) // CHECK:STDOUT: !71 = !{!22, !22} @@ -302,40 +302,40 @@ fn F() { // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !68, type: !22) // CHECK:STDOUT: !74 = !DILocation(line: 37, column: 12, scope: !68) // CHECK:STDOUT: !75 = !DILocation(line: 37, column: 5, scope: !68) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 39, type: !48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !77) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 39, type: !48, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !77) // CHECK:STDOUT: !77 = !{!78} // CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !76, type: !22) // CHECK:STDOUT: !79 = !DILocation(line: 40, column: 12, scope: !76) // CHECK:STDOUT: !80 = !DILocation(line: 40, column: 5, scope: !76) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !82, line: 396, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !82, line: 396, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !82 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !83 = !{!84} // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !81, type: !15) // CHECK:STDOUT: !85 = !DILocation(line: 398, column: 5, scope: !81) // CHECK:STDOUT: !86 = !DILocation(line: 396, column: 3, scope: !81) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 33, type: !88, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 33, type: !88, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !90) // CHECK:STDOUT: !88 = !DISubroutineType(types: !89) // CHECK:STDOUT: !89 = !{!22, !15} // CHECK:STDOUT: !90 = !{!91} // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !87, type: !15) // CHECK:STDOUT: !92 = !DILocation(line: 34, column: 12, scope: !87) // CHECK:STDOUT: !93 = !DILocation(line: 34, column: 5, scope: !87) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 30, type: !95, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.18012f5191ea64dc", scope: null, file: !69, line: 30, type: !95, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !95 = !DISubroutineType(types: !96) // CHECK:STDOUT: !96 = !{!22} // CHECK:STDOUT: !97 = !DILocation(line: 31, column: 12, scope: !94) // CHECK:STDOUT: !98 = !DILocation(line: 31, column: 5, scope: !94) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 141, type: !70, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !100) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 141, type: !70, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !100) // CHECK:STDOUT: !100 = !{!101} // CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !99, type: !22) // CHECK:STDOUT: !102 = !DILocation(line: 142, column: 12, scope: !99) // CHECK:STDOUT: !103 = !DILocation(line: 142, column: 5, scope: !99) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 144, type: !48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !105) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 144, type: !48, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !105) // CHECK:STDOUT: !105 = !{!106} // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !104, type: !22) // CHECK:STDOUT: !107 = !DILocation(line: 145, column: 12, scope: !104) // CHECK:STDOUT: !108 = !DILocation(line: 145, column: 5, scope: !104) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !82, line: 331, type: !110, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !112) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !82, line: 331, type: !110, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !112) // CHECK:STDOUT: !110 = !DISubroutineType(types: !111) // CHECK:STDOUT: !111 = !{null, !15, !15} // CHECK:STDOUT: !112 = !{!113, !114} @@ -343,23 +343,23 @@ fn F() { // CHECK:STDOUT: !114 = !DILocalVariable(arg: 2, scope: !109, type: !15) // CHECK:STDOUT: !115 = !DILocation(line: 0, scope: !109) // CHECK:STDOUT: !116 = !DILocation(line: 331, column: 3, scope: !109) -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 131, type: !88, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !118) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 131, type: !88, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !118) // CHECK:STDOUT: !118 = !{!119} // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !117, type: !15) // CHECK:STDOUT: !120 = !DILocation(line: 137, column: 5, scope: !117) // CHECK:STDOUT: !121 = !DILocation(line: 138, column: 5, scope: !117) // CHECK:STDOUT: !122 = !DILocation(line: 139, column: 5, scope: !117) -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 125, type: !95, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.58016a73bff04416", scope: null, file: !69, line: 125, type: !95, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !124 = !DILocation(line: 128, column: 5, scope: !123) // CHECK:STDOUT: !125 = !DILocation(line: 129, column: 5, scope: !123) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !82, line: 64, type: !127, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !129) +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !82, line: 64, type: !127, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !129) // CHECK:STDOUT: !127 = !DISubroutineType(types: !128) // CHECK:STDOUT: !128 = !{!15, !15} // CHECK:STDOUT: !129 = !{!130} // CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !126, type: !15) // CHECK:STDOUT: !131 = !DILocation(line: 66, column: 17, scope: !126) // CHECK:STDOUT: !132 = !DILocation(line: 66, column: 5, scope: !126) -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !82, line: 59, type: !127, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !134) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !82, line: 59, type: !127, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !134) // CHECK:STDOUT: !134 = !{!135} // CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !133, type: !15) // CHECK:STDOUT: !136 = !DILocation(line: 59, column: 28, scope: !133) diff --git a/toolchain/lower/testdata/array/layout.carbon b/toolchain/lower/testdata/array/layout.carbon index a9e163dac19c..bd1bd78520f0 100644 --- a/toolchain/lower/testdata/array/layout.carbon +++ b/toolchain/lower/testdata/array/layout.carbon @@ -77,14 +77,14 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "element_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "element_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 3, scope: !4) @@ -95,21 +95,21 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: !12 = !DILocation(line: 12, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 12, column: 3, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 9, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 9, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 9, column: 3, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.262c83348679e0a0:core.Destroy.Core", scope: null, file: !3, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.262c83348679e0a0:core.Destroy.Core", scope: null, file: !1, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !22, type: !25) // CHECK:STDOUT: !28 = !DILocation(line: 9, column: 3, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e9b5f64be248720e:core.Destroy.Core", scope: null, file: !3, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e9b5f64be248720e:core.Destroy.Core", scope: null, file: !1, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !25) // CHECK:STDOUT: !32 = !DILocation(line: 9, column: 3, scope: !29) @@ -133,14 +133,14 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "constant_with_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "constant_with_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 3, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/basics/empty.carbon b/toolchain/lower/testdata/basics/empty.carbon index 1d2486262394..07691e257da1 100644 --- a/toolchain/lower/testdata/basics/empty.carbon +++ b/toolchain/lower/testdata/basics/empty.carbon @@ -13,10 +13,10 @@ // CHECK:STDOUT: ; ModuleID = 'empty.carbon' // CHECK:STDOUT: source_filename = "empty.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/toolchain/lower/testdata/builtins/bool.carbon b/toolchain/lower/testdata/builtins/bool.carbon index 477426343f9c..a232602a6973 100644 --- a/toolchain/lower/testdata/builtins/bool.carbon +++ b/toolchain/lower/testdata/builtins/bool.carbon @@ -55,14 +55,14 @@ fn IfEq(a: Bool(), b: Bool()) -> Bool() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "bool.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "bool.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -71,13 +71,13 @@ fn IfEq(a: Bool(), b: Bool()) -> Bool() { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 52, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 16, column: 45, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !13, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 53, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 46, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "IfEq", linkageName: "_CIfEq.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "IfEq", linkageName: "_CIfEq.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21, !22} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocalVariable(arg: 2, scope: !19, type: !7) diff --git a/toolchain/lower/testdata/builtins/char.carbon b/toolchain/lower/testdata/builtins/char.carbon index 9cd0d687eaf9..665734859a53 100644 --- a/toolchain/lower/testdata/builtins/char.carbon +++ b/toolchain/lower/testdata/builtins/char.carbon @@ -51,27 +51,27 @@ fn Example() -> char { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Example", linkageName: "_CExample.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Example", linkageName: "_CExample.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 6, column: 10, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !3, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !1, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 5, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.387a2b9c43474daf:core.Destroy.Core", scope: null, file: !3, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.387a2b9c43474daf:core.Destroy.Core", scope: null, file: !1, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 5, column: 3, scope: !17) diff --git a/toolchain/lower/testdata/builtins/cpp.carbon b/toolchain/lower/testdata/builtins/cpp.carbon index d8552fc9a333..5fc39a375924 100644 --- a/toolchain/lower/testdata/builtins/cpp.carbon +++ b/toolchain/lower/testdata/builtins/cpp.carbon @@ -107,22 +107,22 @@ fn Test() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "std_initializer_list_make.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "std_initializer_list_make.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !6, line: 24, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 24, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 25, column: 22, scope: !11) @@ -132,14 +132,14 @@ fn Test() { // CHECK:STDOUT: !18 = !DILocation(line: 25, column: 3, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 26, column: 3, scope: !11) // CHECK:STDOUT: !20 = !DILocation(line: 24, column: 1, scope: !11) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !21, type: !24) // CHECK:STDOUT: !27 = !DILocation(line: 26, column: 35, scope: !21) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8ab5ebc4f407c395:core.Destroy.Core", scope: null, file: !6, line: 26, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8ab5ebc4f407c395:core.Destroy.Core", scope: null, file: !1, line: 26, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !31} // CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/builtins/float.carbon b/toolchain/lower/testdata/builtins/float.carbon index aa1be13cf125..13c7df41296d 100644 --- a/toolchain/lower/testdata/builtins/float.carbon +++ b/toolchain/lower/testdata/builtins/float.carbon @@ -161,14 +161,14 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -176,7 +176,7 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 39, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 32, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !1, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!7, !7, !7} // CHECK:STDOUT: !15 = !{!16, !17} @@ -184,55 +184,55 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !12, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 44, scope: !12) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 37, scope: !12) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !1, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22, !23} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !23 = !DILocalVariable(arg: 2, scope: !20, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 44, scope: !20) // CHECK:STDOUT: !25 = !DILocation(line: 11, column: 37, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !1, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28, !29} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !26, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 14, column: 44, scope: !26) // CHECK:STDOUT: !31 = !DILocation(line: 14, column: 37, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34, !35} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !35 = !DILocalVariable(arg: 2, scope: !32, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 17, column: 44, scope: !32) // CHECK:STDOUT: !37 = !DILocation(line: 17, column: 37, scope: !32) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !3, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !1, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40, !41} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 2, scope: !38, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 20, column: 44, scope: !38) // CHECK:STDOUT: !43 = !DILocation(line: 20, column: 37, scope: !38) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !3, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !1, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46, !47} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !7) // CHECK:STDOUT: !47 = !DILocalVariable(arg: 2, scope: !44, type: !7) // CHECK:STDOUT: !48 = !DILocation(line: 23, column: 45, scope: !44) // CHECK:STDOUT: !49 = !DILocation(line: 23, column: 38, scope: !44) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !3, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !51) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !1, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !51 = !{!52, !53} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !50, type: !7) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !50, type: !7) // CHECK:STDOUT: !54 = !DILocation(line: 26, column: 46, scope: !50) // CHECK:STDOUT: !55 = !DILocation(line: 26, column: 39, scope: !50) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !3, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !1, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !57) // CHECK:STDOUT: !57 = !{!58, !59} // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !56, type: !7) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 2, scope: !56, type: !7) // CHECK:STDOUT: !60 = !DILocation(line: 29, column: 48, scope: !56) // CHECK:STDOUT: !61 = !DILocation(line: 29, column: 41, scope: !56) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !3, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !1, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !63 = !{!64, !65} // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !62, type: !7) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 2, scope: !62, type: !7) // CHECK:STDOUT: !66 = !DILocation(line: 32, column: 49, scope: !62) // CHECK:STDOUT: !67 = !DILocation(line: 32, column: 42, scope: !62) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !3, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !1, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !69) // CHECK:STDOUT: !69 = !{!70, !71} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !68, type: !7) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 2, scope: !68, type: !7) @@ -279,14 +279,14 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "compound_assign.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "compound_assign.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -295,19 +295,19 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 34, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !13, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 8, column: 34, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 1, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21, !22} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocalVariable(arg: 2, scope: !19, type: !7) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 34, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 1, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27, !28} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocalVariable(arg: 2, scope: !25, type: !7) @@ -346,14 +346,14 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "types.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestF16", linkageName: "_CTestF16.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "types.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestF16", linkageName: "_CTestF16.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -362,19 +362,19 @@ fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 44, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 37, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestF32", linkageName: "_CTestF32.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestF32", linkageName: "_CTestF32.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !13, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 8, column: 44, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 37, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestF64", linkageName: "_CTestF64.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestF64", linkageName: "_CTestF64.Main", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21, !22} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocalVariable(arg: 2, scope: !19, type: !7) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 44, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 37, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestF128", linkageName: "_CTestF128.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestF128", linkageName: "_CTestF128.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27, !28} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocalVariable(arg: 2, scope: !25, type: !7) diff --git a/toolchain/lower/testdata/builtins/float_to_float.carbon b/toolchain/lower/testdata/builtins/float_to_float.carbon index 2b8814e1ce58..b9386b735be9 100644 --- a/toolchain/lower/testdata/builtins/float_to_float.carbon +++ b/toolchain/lower/testdata/builtins/float_to_float.carbon @@ -48,14 +48,14 @@ fn TestConvertF16ToF128(a: f16) -> f128 { return ConvertF16ToF128(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "float_to_float.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertF32ToF64", linkageName: "_CTestConvertF32ToF64.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "float_to_float.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertF32ToF64", linkageName: "_CTestConvertF32ToF64.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -63,12 +63,12 @@ fn TestConvertF16ToF128(a: f16) -> f128 { return ConvertF16ToF128(a); } // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 4, column: 48, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 41, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestConvertF64ToF32", linkageName: "_CTestConvertF64ToF32.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestConvertF64ToF32", linkageName: "_CTestConvertF64ToF32.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !15 = !DILocation(line: 7, column: 48, scope: !12) // CHECK:STDOUT: !16 = !DILocation(line: 7, column: 41, scope: !12) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "TestConvertF16ToF128", linkageName: "_CTestConvertF16ToF128.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "TestConvertF16ToF128", linkageName: "_CTestConvertF16ToF128.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 10, column: 50, scope: !17) diff --git a/toolchain/lower/testdata/builtins/float_to_int.carbon b/toolchain/lower/testdata/builtins/float_to_int.carbon index d049135b9af9..3322f0d90c3a 100644 --- a/toolchain/lower/testdata/builtins/float_to_int.carbon +++ b/toolchain/lower/testdata/builtins/float_to_int.carbon @@ -78,14 +78,14 @@ fn TestConvertF128ToU64(a: f128) -> u64 { return ConvertF128ToU64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "float_to_int.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertF32ToI32", linkageName: "_CTestConvertF32ToI32.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "float_to_int.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertF32ToI32", linkageName: "_CTestConvertF32ToI32.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -94,7 +94,7 @@ fn TestConvertF128ToU64(a: f128) -> u64 { return ConvertF128ToU64(a); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 48, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 4, column: 41, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestConvertF32ToU32", linkageName: "_CTestConvertF32ToU32.Main", scope: null, file: !3, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestConvertF32ToU32", linkageName: "_CTestConvertF32ToU32.Main", scope: null, file: !1, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!16, !8} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -102,17 +102,17 @@ fn TestConvertF128ToU64(a: f128) -> u64 { return ConvertF128ToU64(a); } // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !8) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 48, scope: !13) // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 41, scope: !13) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestConvertF64ToI32", linkageName: "_CTestConvertF64ToI32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestConvertF64ToI32", linkageName: "_CTestConvertF64ToI32.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !21, type: !8) // CHECK:STDOUT: !24 = !DILocation(line: 10, column: 48, scope: !21) // CHECK:STDOUT: !25 = !DILocation(line: 10, column: 41, scope: !21) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestConvertF64ToU32", linkageName: "_CTestConvertF64ToU32.Main", scope: null, file: !3, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestConvertF64ToU32", linkageName: "_CTestConvertF64ToU32.Main", scope: null, file: !1, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !8) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 48, scope: !26) // CHECK:STDOUT: !30 = !DILocation(line: 13, column: 41, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestConvertF128ToI64", linkageName: "_CTestConvertF128ToI64.Main", scope: null, file: !3, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestConvertF128ToI64", linkageName: "_CTestConvertF128ToI64.Main", scope: null, file: !1, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{!34, !8} // CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) @@ -120,7 +120,7 @@ fn TestConvertF128ToU64(a: f128) -> u64 { return ConvertF128ToU64(a); } // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !31, type: !8) // CHECK:STDOUT: !37 = !DILocation(line: 16, column: 50, scope: !31) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 43, scope: !31) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestConvertF128ToU64", linkageName: "_CTestConvertF128ToU64.Main", scope: null, file: !3, line: 19, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestConvertF128ToU64", linkageName: "_CTestConvertF128ToU64.Main", scope: null, file: !1, line: 19, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{!42, !8} // CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) diff --git a/toolchain/lower/testdata/builtins/int.carbon b/toolchain/lower/testdata/builtins/int.carbon index 903d1750bf59..dc8b5a53a901 100644 --- a/toolchain/lower/testdata/builtins/int.carbon +++ b/toolchain/lower/testdata/builtins/int.carbon @@ -360,14 +360,14 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -375,7 +375,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 39, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 32, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !1, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!7, !7, !7} // CHECK:STDOUT: !15 = !{!16, !17} @@ -383,66 +383,66 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !12, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 44, scope: !12) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 37, scope: !12) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !1, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22, !23} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !23 = !DILocalVariable(arg: 2, scope: !20, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 44, scope: !20) // CHECK:STDOUT: !25 = !DILocation(line: 11, column: 37, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !1, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28, !29} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !26, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 14, column: 44, scope: !26) // CHECK:STDOUT: !31 = !DILocation(line: 14, column: 37, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34, !35} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !35 = !DILocalVariable(arg: 2, scope: !32, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 17, column: 44, scope: !32) // CHECK:STDOUT: !37 = !DILocation(line: 17, column: 37, scope: !32) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !3, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !1, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40, !41} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 2, scope: !38, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 20, column: 44, scope: !38) // CHECK:STDOUT: !43 = !DILocation(line: 20, column: 37, scope: !38) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !7) // CHECK:STDOUT: !47 = !DILocation(line: 23, column: 43, scope: !44) // CHECK:STDOUT: !48 = !DILocation(line: 23, column: 36, scope: !44) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !3, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !1, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51, !52} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !7) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !49, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 26, column: 44, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 26, column: 37, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !3, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !1, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57, !58} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !55, type: !7) // CHECK:STDOUT: !59 = !DILocation(line: 29, column: 43, scope: !55) // CHECK:STDOUT: !60 = !DILocation(line: 29, column: 36, scope: !55) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !3, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !1, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63, !64} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !7) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !61, type: !7) // CHECK:STDOUT: !65 = !DILocation(line: 32, column: 44, scope: !61) // CHECK:STDOUT: !66 = !DILocation(line: 32, column: 37, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !3, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !1, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69, !70} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !7) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !67, type: !7) // CHECK:STDOUT: !71 = !DILocation(line: 35, column: 50, scope: !67) // CHECK:STDOUT: !72 = !DILocation(line: 35, column: 43, scope: !67) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !3, line: 38, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !1, line: 38, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75, !76} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !73, type: !7) // CHECK:STDOUT: !77 = !DILocation(line: 38, column: 61, scope: !73) // CHECK:STDOUT: !78 = !DILocation(line: 38, column: 54, scope: !73) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !3, line: 41, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !1, line: 41, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !80 = !DISubroutineType(types: !81) // CHECK:STDOUT: !81 = !{!82, !82, !82} // CHECK:STDOUT: !82 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -451,7 +451,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !79, type: !82) // CHECK:STDOUT: !86 = !DILocation(line: 41, column: 58, scope: !79) // CHECK:STDOUT: !87 = !DILocation(line: 41, column: 51, scope: !79) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !3, line: 44, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !1, line: 44, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !89 = !DISubroutineType(types: !90) // CHECK:STDOUT: !90 = !{!91, !7, !7} // CHECK:STDOUT: !91 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -460,31 +460,31 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !94 = !DILocalVariable(arg: 2, scope: !88, type: !7) // CHECK:STDOUT: !95 = !DILocation(line: 44, column: 44, scope: !88) // CHECK:STDOUT: !96 = !DILocation(line: 44, column: 37, scope: !88) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !3, line: 47, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !98) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !1, line: 47, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !98) // CHECK:STDOUT: !98 = !{!99, !100} // CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !97, type: !7) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !97, type: !7) // CHECK:STDOUT: !101 = !DILocation(line: 47, column: 45, scope: !97) // CHECK:STDOUT: !102 = !DILocation(line: 47, column: 38, scope: !97) -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !3, line: 50, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !104) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !1, line: 50, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !104) // CHECK:STDOUT: !104 = !{!105, !106} // CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !103, type: !7) // CHECK:STDOUT: !106 = !DILocalVariable(arg: 2, scope: !103, type: !7) // CHECK:STDOUT: !107 = !DILocation(line: 50, column: 46, scope: !103) // CHECK:STDOUT: !108 = !DILocation(line: 50, column: 39, scope: !103) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !3, line: 53, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !110) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !1, line: 53, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !110) // CHECK:STDOUT: !110 = !{!111, !112} // CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !109, type: !7) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 2, scope: !109, type: !7) // CHECK:STDOUT: !113 = !DILocation(line: 53, column: 48, scope: !109) // CHECK:STDOUT: !114 = !DILocation(line: 53, column: 41, scope: !109) -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !3, line: 56, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !116) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !1, line: 56, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !116) // CHECK:STDOUT: !116 = !{!117, !118} // CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !115, type: !7) // CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !115, type: !7) // CHECK:STDOUT: !119 = !DILocation(line: 56, column: 49, scope: !115) // CHECK:STDOUT: !120 = !DILocation(line: 56, column: 42, scope: !115) -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !3, line: 59, type: !89, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !122) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !1, line: 59, type: !89, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !122) // CHECK:STDOUT: !122 = !{!123, !124} // CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !121, type: !7) // CHECK:STDOUT: !124 = !DILocalVariable(arg: 2, scope: !121, type: !7) @@ -639,14 +639,14 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "compound_assign.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestSAdd", linkageName: "_CTestSAdd.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "compound_assign.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestSAdd", linkageName: "_CTestSAdd.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -655,85 +655,85 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 35, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestSSub", linkageName: "_CTestSSub.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestSSub", linkageName: "_CTestSSub.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !13, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 8, column: 35, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 1, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestSMul", linkageName: "_CTestSMul.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "TestSMul", linkageName: "_CTestSMul.Main", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21, !22} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocalVariable(arg: 2, scope: !19, type: !7) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 35, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 1, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestSDiv", linkageName: "_CTestSDiv.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "TestSDiv", linkageName: "_CTestSDiv.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27, !28} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocalVariable(arg: 2, scope: !25, type: !7) // CHECK:STDOUT: !29 = !DILocation(line: 14, column: 35, scope: !25) // CHECK:STDOUT: !30 = !DILocation(line: 14, column: 1, scope: !25) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestSMod", linkageName: "_CTestSMod.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestSMod", linkageName: "_CTestSMod.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33, !34} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !7) // CHECK:STDOUT: !34 = !DILocalVariable(arg: 2, scope: !31, type: !7) // CHECK:STDOUT: !35 = !DILocation(line: 17, column: 35, scope: !31) // CHECK:STDOUT: !36 = !DILocation(line: 17, column: 1, scope: !31) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "TestUAdd", linkageName: "_CTestUAdd.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "TestUAdd", linkageName: "_CTestUAdd.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39, !40} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !37, type: !7) // CHECK:STDOUT: !41 = !DILocation(line: 20, column: 35, scope: !37) // CHECK:STDOUT: !42 = !DILocation(line: 20, column: 1, scope: !37) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "TestUSub", linkageName: "_CTestUSub.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "TestUSub", linkageName: "_CTestUSub.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45, !46} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 2, scope: !43, type: !7) // CHECK:STDOUT: !47 = !DILocation(line: 23, column: 35, scope: !43) // CHECK:STDOUT: !48 = !DILocation(line: 23, column: 1, scope: !43) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestUMul", linkageName: "_CTestUMul.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestUMul", linkageName: "_CTestUMul.Main", scope: null, file: !1, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51, !52} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !7) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !49, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 26, column: 35, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 26, column: 1, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestUDiv", linkageName: "_CTestUDiv.Main", scope: null, file: !3, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestUDiv", linkageName: "_CTestUDiv.Main", scope: null, file: !1, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57, !58} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !55, type: !7) // CHECK:STDOUT: !59 = !DILocation(line: 29, column: 35, scope: !55) // CHECK:STDOUT: !60 = !DILocation(line: 29, column: 1, scope: !55) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestUMod", linkageName: "_CTestUMod.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestUMod", linkageName: "_CTestUMod.Main", scope: null, file: !1, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63, !64} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !7) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !61, type: !7) // CHECK:STDOUT: !65 = !DILocation(line: 32, column: 35, scope: !61) // CHECK:STDOUT: !66 = !DILocation(line: 32, column: 1, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !1, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69, !70} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !7) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !67, type: !7) // CHECK:STDOUT: !71 = !DILocation(line: 35, column: 34, scope: !67) // CHECK:STDOUT: !72 = !DILocation(line: 35, column: 1, scope: !67) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !3, line: 38, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !1, line: 38, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75, !76} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !73, type: !7) // CHECK:STDOUT: !77 = !DILocation(line: 38, column: 33, scope: !73) // CHECK:STDOUT: !78 = !DILocation(line: 38, column: 1, scope: !73) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !3, line: 41, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !80) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !1, line: 41, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !80) // CHECK:STDOUT: !80 = !{!81, !82} // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !79, type: !7) // CHECK:STDOUT: !82 = !DILocalVariable(arg: 2, scope: !79, type: !7) // CHECK:STDOUT: !83 = !DILocation(line: 41, column: 34, scope: !79) // CHECK:STDOUT: !84 = !DILocation(line: 41, column: 1, scope: !79) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !3, line: 44, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !1, line: 44, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !86 = !{!87, !88} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !85, type: !7) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 2, scope: !85, type: !7) // CHECK:STDOUT: !89 = !DILocation(line: 44, column: 40, scope: !85) // CHECK:STDOUT: !90 = !DILocation(line: 44, column: 1, scope: !85) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !3, line: 47, type: !92, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !95) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "TestArithmeticRightShift", linkageName: "_CTestArithmeticRightShift.Main", scope: null, file: !1, line: 47, type: !92, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !95) // CHECK:STDOUT: !92 = !DISubroutineType(types: !93) // CHECK:STDOUT: !93 = !{null, !7, !94} // CHECK:STDOUT: !94 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -742,7 +742,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !97 = !DILocalVariable(arg: 2, scope: !91, type: !94) // CHECK:STDOUT: !98 = !DILocation(line: 47, column: 51, scope: !91) // CHECK:STDOUT: !99 = !DILocation(line: 47, column: 1, scope: !91) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !3, line: 50, type: !101, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !103) +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "TestLogicalRightShift", linkageName: "_CTestLogicalRightShift.Main", scope: null, file: !1, line: 50, type: !101, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !103) // CHECK:STDOUT: !101 = !DISubroutineType(types: !102) // CHECK:STDOUT: !102 = !{null, !94, !94} // CHECK:STDOUT: !103 = !{!104, !105} @@ -835,14 +835,14 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "mixed_shift.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestLeftShiftSmaller", linkageName: "_CTestLeftShiftSmaller.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "mixed_shift.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestLeftShiftSmaller", linkageName: "_CTestLeftShiftSmaller.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -852,13 +852,13 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !11 = !DILocalVariable(arg: 2, scope: !4, type: !8) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 57, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 5, column: 50, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "TestRightShiftSmaller", linkageName: "_CTestRightShiftSmaller.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "TestRightShiftSmaller", linkageName: "_CTestRightShiftSmaller.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !15 = !{!16, !17} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !14, type: !7) // CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !14, type: !8) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 58, scope: !14) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 51, scope: !14) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestLeftShiftLargerII", linkageName: "_CTestLeftShiftLargerII.Main", scope: null, file: !3, line: 11, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestLeftShiftLargerII", linkageName: "_CTestLeftShiftLargerII.Main", scope: null, file: !1, line: 11, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!8, !8, !7} // CHECK:STDOUT: !23 = !{!24, !25} @@ -866,13 +866,13 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !25 = !DILocalVariable(arg: 2, scope: !20, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 11, column: 58, scope: !20) // CHECK:STDOUT: !27 = !DILocation(line: 11, column: 51, scope: !20) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "TestRightShiftLargerII", linkageName: "_CTestRightShiftLargerII.Main", scope: null, file: !3, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "TestRightShiftLargerII", linkageName: "_CTestRightShiftLargerII.Main", scope: null, file: !1, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30, !31} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !8) // CHECK:STDOUT: !31 = !DILocalVariable(arg: 2, scope: !28, type: !7) // CHECK:STDOUT: !32 = !DILocation(line: 14, column: 59, scope: !28) // CHECK:STDOUT: !33 = !DILocation(line: 14, column: 52, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "TestLeftShiftLargerIU", linkageName: "_CTestLeftShiftLargerIU.Main", scope: null, file: !3, line: 17, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "TestLeftShiftLargerIU", linkageName: "_CTestLeftShiftLargerIU.Main", scope: null, file: !1, line: 17, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!8, !8, !37} // CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -881,13 +881,13 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !34, type: !37) // CHECK:STDOUT: !41 = !DILocation(line: 17, column: 58, scope: !34) // CHECK:STDOUT: !42 = !DILocation(line: 17, column: 51, scope: !34) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "TestRightShiftLargerIU", linkageName: "_CTestRightShiftLargerIU.Main", scope: null, file: !3, line: 20, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "TestRightShiftLargerIU", linkageName: "_CTestRightShiftLargerIU.Main", scope: null, file: !1, line: 20, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45, !46} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !8) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 2, scope: !43, type: !37) // CHECK:STDOUT: !47 = !DILocation(line: 20, column: 59, scope: !43) // CHECK:STDOUT: !48 = !DILocation(line: 20, column: 52, scope: !43) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestLeftShiftLargerUI", linkageName: "_CTestLeftShiftLargerUI.Main", scope: null, file: !3, line: 23, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestLeftShiftLargerUI", linkageName: "_CTestLeftShiftLargerUI.Main", scope: null, file: !1, line: 23, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !50 = !DISubroutineType(types: !51) // CHECK:STDOUT: !51 = !{!52, !52, !7} // CHECK:STDOUT: !52 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) @@ -896,13 +896,13 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !55 = !DILocalVariable(arg: 2, scope: !49, type: !7) // CHECK:STDOUT: !56 = !DILocation(line: 23, column: 58, scope: !49) // CHECK:STDOUT: !57 = !DILocation(line: 23, column: 51, scope: !49) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "TestRightShiftLargerUI", linkageName: "_CTestRightShiftLargerUI.Main", scope: null, file: !3, line: 26, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !59) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "TestRightShiftLargerUI", linkageName: "_CTestRightShiftLargerUI.Main", scope: null, file: !1, line: 26, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !59) // CHECK:STDOUT: !59 = !{!60, !61} // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !58, type: !52) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 2, scope: !58, type: !7) // CHECK:STDOUT: !62 = !DILocation(line: 26, column: 59, scope: !58) // CHECK:STDOUT: !63 = !DILocation(line: 26, column: 52, scope: !58) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "TestLeftShiftLargerUU", linkageName: "_CTestLeftShiftLargerUU.Main", scope: null, file: !3, line: 29, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "TestLeftShiftLargerUU", linkageName: "_CTestLeftShiftLargerUU.Main", scope: null, file: !1, line: 29, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !67) // CHECK:STDOUT: !65 = !DISubroutineType(types: !66) // CHECK:STDOUT: !66 = !{!52, !52, !37} // CHECK:STDOUT: !67 = !{!68, !69} @@ -910,7 +910,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !69 = !DILocalVariable(arg: 2, scope: !64, type: !37) // CHECK:STDOUT: !70 = !DILocation(line: 29, column: 58, scope: !64) // CHECK:STDOUT: !71 = !DILocation(line: 29, column: 51, scope: !64) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "TestRightShiftLargerUU", linkageName: "_CTestRightShiftLargerUU.Main", scope: null, file: !3, line: 32, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !73) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "TestRightShiftLargerUU", linkageName: "_CTestRightShiftLargerUU.Main", scope: null, file: !1, line: 32, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !73) // CHECK:STDOUT: !73 = !{!74, !75} // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !52) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 2, scope: !72, type: !37) @@ -1005,14 +1005,14 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "mixed_compare.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !10) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "mixed_compare.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !10) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8, !9} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -1023,7 +1023,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !12 = !DILocalVariable(arg: 2, scope: !4, type: !9) // CHECK:STDOUT: !13 = !DILocation(line: 10, column: 52, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 10, column: 45, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !3, line: 11, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !1, line: 11, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{!7, !18, !9} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) @@ -1032,7 +1032,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !21 = !DILocalVariable(arg: 2, scope: !15, type: !9) // CHECK:STDOUT: !22 = !DILocation(line: 11, column: 52, scope: !15) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 45, scope: !15) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !3, line: 12, type: !25, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !1, line: 12, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!7, !8, !27} // CHECK:STDOUT: !27 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -1041,7 +1041,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !30 = !DILocalVariable(arg: 2, scope: !24, type: !27) // CHECK:STDOUT: !31 = !DILocation(line: 12, column: 52, scope: !24) // CHECK:STDOUT: !32 = !DILocation(line: 12, column: 45, scope: !24) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !3, line: 13, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !1, line: 13, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !34 = !DISubroutineType(types: !35) // CHECK:STDOUT: !35 = !{!7, !18, !27} // CHECK:STDOUT: !36 = !{!37, !38} @@ -1049,7 +1049,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !33, type: !27) // CHECK:STDOUT: !39 = !DILocation(line: 13, column: 52, scope: !33) // CHECK:STDOUT: !40 = !DILocation(line: 13, column: 45, scope: !33) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !3, line: 14, type: !42, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !1, line: 14, type: !42, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !42 = !DISubroutineType(types: !43) // CHECK:STDOUT: !43 = !{!7, !27, !9} // CHECK:STDOUT: !44 = !{!45, !46} @@ -1057,31 +1057,31 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !46 = !DILocalVariable(arg: 2, scope: !41, type: !9) // CHECK:STDOUT: !47 = !DILocation(line: 14, column: 52, scope: !41) // CHECK:STDOUT: !48 = !DILocation(line: 14, column: 45, scope: !41) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51, !52} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !8) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !49, type: !9) // CHECK:STDOUT: !53 = !DILocation(line: 22, column: 54, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 22, column: 47, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !3, line: 23, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !1, line: 23, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57, !58} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !18) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !55, type: !9) // CHECK:STDOUT: !59 = !DILocation(line: 23, column: 54, scope: !55) // CHECK:STDOUT: !60 = !DILocation(line: 23, column: 47, scope: !55) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !3, line: 24, type: !25, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !1, line: 24, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63, !64} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !8) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !61, type: !27) // CHECK:STDOUT: !65 = !DILocation(line: 24, column: 54, scope: !61) // CHECK:STDOUT: !66 = !DILocation(line: 24, column: 47, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !3, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !1, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69, !70} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !18) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !67, type: !27) // CHECK:STDOUT: !71 = !DILocation(line: 25, column: 54, scope: !67) // CHECK:STDOUT: !72 = !DILocation(line: 25, column: 47, scope: !67) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !3, line: 26, type: !42, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !1, line: 26, type: !42, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75, !76} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !27) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !73, type: !9) @@ -1172,40 +1172,40 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestInt32ToInt32", linkageName: "_CTestInt32ToInt32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestInt32ToInt32", linkageName: "_CTestInt32ToInt32.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 10, column: 38, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "TestInt32ToUint32", linkageName: "_CTestInt32ToUint32.Main", scope: null, file: !3, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "TestInt32ToUint32", linkageName: "_CTestInt32ToUint32.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !7} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 11, column: 39, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TestUint32ToInt32", linkageName: "_CTestUint32ToInt32.Main", scope: null, file: !3, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TestUint32ToInt32", linkageName: "_CTestUint32ToInt32.Main", scope: null, file: !1, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{!7, !14} // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !23 = !DILocation(line: 12, column: 39, scope: !18) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestUint32ToUint32", linkageName: "_CTestUint32ToUint32.Main", scope: null, file: !3, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestUint32ToUint32", linkageName: "_CTestUint32ToUint32.Main", scope: null, file: !1, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!14, !14} // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !24, type: !14) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 40, scope: !24) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "TestInt32ToInt16", linkageName: "_CTestInt32ToInt16.Main", scope: null, file: !3, line: 21, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "TestInt32ToInt16", linkageName: "_CTestInt32ToInt16.Main", scope: null, file: !1, line: 21, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{!33, !7} // CHECK:STDOUT: !33 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) @@ -1213,7 +1213,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !30, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 21, column: 45, scope: !30) // CHECK:STDOUT: !37 = !DILocation(line: 21, column: 38, scope: !30) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestInt32ToUint16", linkageName: "_CTestInt32ToUint16.Main", scope: null, file: !3, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestInt32ToUint16", linkageName: "_CTestInt32ToUint16.Main", scope: null, file: !1, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !39 = !DISubroutineType(types: !40) // CHECK:STDOUT: !40 = !{!41, !7} // CHECK:STDOUT: !41 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) @@ -1221,21 +1221,21 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 22, column: 46, scope: !38) // CHECK:STDOUT: !45 = !DILocation(line: 22, column: 39, scope: !38) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TestUint32ToInt16", linkageName: "_CTestUint32ToInt16.Main", scope: null, file: !3, line: 23, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "TestUint32ToInt16", linkageName: "_CTestUint32ToInt16.Main", scope: null, file: !1, line: 23, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!33, !14} // CHECK:STDOUT: !49 = !{!50} // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !46, type: !14) // CHECK:STDOUT: !51 = !DILocation(line: 23, column: 46, scope: !46) // CHECK:STDOUT: !52 = !DILocation(line: 23, column: 39, scope: !46) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "TestUint32ToUint16", linkageName: "_CTestUint32ToUint16.Main", scope: null, file: !3, line: 24, type: !54, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "TestUint32ToUint16", linkageName: "_CTestUint32ToUint16.Main", scope: null, file: !1, line: 24, type: !54, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !54 = !DISubroutineType(types: !55) // CHECK:STDOUT: !55 = !{!41, !14} // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !53, type: !14) // CHECK:STDOUT: !58 = !DILocation(line: 24, column: 47, scope: !53) // CHECK:STDOUT: !59 = !DILocation(line: 24, column: 40, scope: !53) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "TestInt32ToInt64", linkageName: "_CTestInt32ToInt64.Main", scope: null, file: !3, line: 32, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !64) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "TestInt32ToInt64", linkageName: "_CTestInt32ToInt64.Main", scope: null, file: !1, line: 32, type: !61, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !64) // CHECK:STDOUT: !61 = !DISubroutineType(types: !62) // CHECK:STDOUT: !62 = !{!63, !7} // CHECK:STDOUT: !63 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) @@ -1243,7 +1243,7 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !60, type: !7) // CHECK:STDOUT: !66 = !DILocation(line: 32, column: 45, scope: !60) // CHECK:STDOUT: !67 = !DILocation(line: 32, column: 38, scope: !60) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "TestInt32ToUint64", linkageName: "_CTestInt32ToUint64.Main", scope: null, file: !3, line: 33, type: !69, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "TestInt32ToUint64", linkageName: "_CTestInt32ToUint64.Main", scope: null, file: !1, line: 33, type: !69, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !72) // CHECK:STDOUT: !69 = !DISubroutineType(types: !70) // CHECK:STDOUT: !70 = !{!71, !7} // CHECK:STDOUT: !71 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) @@ -1251,14 +1251,14 @@ fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !68, type: !7) // CHECK:STDOUT: !74 = !DILocation(line: 33, column: 46, scope: !68) // CHECK:STDOUT: !75 = !DILocation(line: 33, column: 39, scope: !68) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "TestUint32ToInt64", linkageName: "_CTestUint32ToInt64.Main", scope: null, file: !3, line: 34, type: !77, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "TestUint32ToInt64", linkageName: "_CTestUint32ToInt64.Main", scope: null, file: !1, line: 34, type: !77, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !79) // CHECK:STDOUT: !77 = !DISubroutineType(types: !78) // CHECK:STDOUT: !78 = !{!63, !14} // CHECK:STDOUT: !79 = !{!80} // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !76, type: !14) // CHECK:STDOUT: !81 = !DILocation(line: 34, column: 46, scope: !76) // CHECK:STDOUT: !82 = !DILocation(line: 34, column: 39, scope: !76) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "TestUint32ToUint64", linkageName: "_CTestUint32ToUint64.Main", scope: null, file: !3, line: 35, type: !84, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "TestUint32ToUint64", linkageName: "_CTestUint32ToUint64.Main", scope: null, file: !1, line: 35, type: !84, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !84 = !DISubroutineType(types: !85) // CHECK:STDOUT: !85 = !{!71, !14} // CHECK:STDOUT: !86 = !{!87} diff --git a/toolchain/lower/testdata/builtins/int_literal.carbon b/toolchain/lower/testdata/builtins/int_literal.carbon index 08bae21d5874..7aefa04f53f0 100644 --- a/toolchain/lower/testdata/builtins/int_literal.carbon +++ b/toolchain/lower/testdata/builtins/int_literal.carbon @@ -57,26 +57,26 @@ fn IntMin() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "int_literal.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "int_literal.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MinusOne", linkageName: "_CMinusOne.Main", scope: null, file: !3, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MinusOne", linkageName: "_CMinusOne.Main", scope: null, file: !1, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !DILocation(line: 20, column: 3, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "IntMax", linkageName: "_CIntMax.Main", scope: null, file: !3, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "IntMax", linkageName: "_CIntMax.Main", scope: null, file: !1, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DILocation(line: 24, column: 3, scope: !16) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "IntMin", linkageName: "_CIntMin.Main", scope: null, file: !3, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "IntMin", linkageName: "_CIntMin.Main", scope: null, file: !1, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !19 = !DILocation(line: 28, column: 3, scope: !18) diff --git a/toolchain/lower/testdata/builtins/int_to_float.carbon b/toolchain/lower/testdata/builtins/int_to_float.carbon index bf072239851c..c33f5ad8e378 100644 --- a/toolchain/lower/testdata/builtins/int_to_float.carbon +++ b/toolchain/lower/testdata/builtins/int_to_float.carbon @@ -78,14 +78,14 @@ fn TestConvertU64ToF128(a: u64) -> f128 { return ConvertU64ToF128(a); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "int_to_float.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertI32ToF32", linkageName: "_CTestConvertI32ToF32.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "int_to_float.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestConvertI32ToF32", linkageName: "_CTestConvertI32ToF32.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -94,7 +94,7 @@ fn TestConvertU64ToF128(a: u64) -> f128 { return ConvertU64ToF128(a); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 48, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 4, column: 41, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestConvertU32ToF32", linkageName: "_CTestConvertU32ToF32.Main", scope: null, file: !3, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestConvertU32ToF32", linkageName: "_CTestConvertU32ToF32.Main", scope: null, file: !1, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!7, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -102,17 +102,17 @@ fn TestConvertU64ToF128(a: u64) -> f128 { return ConvertU64ToF128(a); } // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 48, scope: !13) // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 41, scope: !13) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestConvertI32ToF64", linkageName: "_CTestConvertI32ToF64.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestConvertI32ToF64", linkageName: "_CTestConvertI32ToF64.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !21, type: !8) // CHECK:STDOUT: !24 = !DILocation(line: 10, column: 48, scope: !21) // CHECK:STDOUT: !25 = !DILocation(line: 10, column: 41, scope: !21) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestConvertU32ToF64", linkageName: "_CTestConvertU32ToF64.Main", scope: null, file: !3, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestConvertU32ToF64", linkageName: "_CTestConvertU32ToF64.Main", scope: null, file: !1, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !16) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 48, scope: !26) // CHECK:STDOUT: !30 = !DILocation(line: 13, column: 41, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestConvertI64ToF128", linkageName: "_CTestConvertI64ToF128.Main", scope: null, file: !3, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "TestConvertI64ToF128", linkageName: "_CTestConvertI64ToF128.Main", scope: null, file: !1, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{!7, !34} // CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) @@ -120,7 +120,7 @@ fn TestConvertU64ToF128(a: u64) -> f128 { return ConvertU64ToF128(a); } // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !31, type: !34) // CHECK:STDOUT: !37 = !DILocation(line: 16, column: 50, scope: !31) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 43, scope: !31) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestConvertU64ToF128", linkageName: "_CTestConvertU64ToF128.Main", scope: null, file: !3, line: 19, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "TestConvertU64ToF128", linkageName: "_CTestConvertU64ToF128.Main", scope: null, file: !1, line: 19, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{!7, !42} // CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) diff --git a/toolchain/lower/testdata/builtins/maybe_unformed.carbon b/toolchain/lower/testdata/builtins/maybe_unformed.carbon index 73d170be52d7..025c803a3419 100644 --- a/toolchain/lower/testdata/builtins/maybe_unformed.carbon +++ b/toolchain/lower/testdata/builtins/maybe_unformed.carbon @@ -179,75 +179,75 @@ fn PassAdapterBool() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "maybe_unformed.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TakeI32", linkageName: "_CTakeI32.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "maybe_unformed.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TakeI32", linkageName: "_CTakeI32.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "TakeBool", linkageName: "_CTakeBool.Main", scope: null, file: !3, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "TakeBool", linkageName: "_CTakeBool.Main", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 18, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !3, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !1, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null} // CHECK:STDOUT: !21 = !DILocation(line: 23, column: 11, scope: !18) // CHECK:STDOUT: !22 = !DILocation(line: 23, column: 3, scope: !18) // CHECK:STDOUT: !23 = !DILocation(line: 21, column: 1, scope: !18) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassBool", linkageName: "_CPassBool.Main", scope: null, file: !3, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassBool", linkageName: "_CPassBool.Main", scope: null, file: !1, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !25 = !DILocation(line: 28, column: 12, scope: !24) // CHECK:STDOUT: !26 = !DILocation(line: 28, column: 3, scope: !24) // CHECK:STDOUT: !27 = !DILocation(line: 26, column: 1, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ac1fbb61b7f8ef04:core.Destroy.Core", scope: null, file: !3, line: 28, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ac1fbb61b7f8ef04:core.Destroy.Core", scope: null, file: !1, line: 28, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !14) // CHECK:STDOUT: !31 = !DILocation(line: 28, column: 12, scope: !28) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !3, line: 31, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !1, line: 31, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !14) // CHECK:STDOUT: !35 = !DILocation(line: 32, column: 3, scope: !32) // CHECK:STDOUT: !36 = !DILocation(line: 31, column: 1, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !3, line: 42, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !1, line: 42, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !40 = !DILocation(line: 42, column: 1, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !3, line: 45, type: !19, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !1, line: 45, type: !19, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !42 = !DILocation(line: 48, column: 18, scope: !41) // CHECK:STDOUT: !43 = !DILocation(line: 48, column: 3, scope: !41) // CHECK:STDOUT: !44 = !DILocation(line: 45, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 48, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 48, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !7) // CHECK:STDOUT: !48 = !DILocation(line: 48, column: 18, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !3, line: 48, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !1, line: 48, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !14) // CHECK:STDOUT: !52 = !DILocation(line: 48, column: 18, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37bf4066dfa3831f:core.Destroy.Core", scope: null, file: !3, line: 48, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37bf4066dfa3831f:core.Destroy.Core", scope: null, file: !1, line: 48, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !7) // CHECK:STDOUT: !56 = !DILocation(line: 48, column: 18, scope: !53) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !3, line: 51, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !58) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !1, line: 51, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !58 = !{!59} // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !57, type: !14) // CHECK:STDOUT: !60 = !DILocation(line: 51, column: 1, scope: !57) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !3, line: 54, type: !19, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !1, line: 54, type: !19, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !62 = !DILocation(line: 55, column: 19, scope: !61) // CHECK:STDOUT: !63 = !DILocation(line: 55, column: 3, scope: !61) // CHECK:STDOUT: !64 = !DILocation(line: 54, column: 1, scope: !61) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f633bf9c4580207a:core.Destroy.Core", scope: null, file: !3, line: 55, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f633bf9c4580207a:core.Destroy.Core", scope: null, file: !1, line: 55, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !66) // CHECK:STDOUT: !66 = !{!67} // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !65, type: !14) // CHECK:STDOUT: !68 = !DILocation(line: 55, column: 19, scope: !65) diff --git a/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon b/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon index d8c4a21c04a6..ae2ad27a1c1d 100644 --- a/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon +++ b/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon @@ -35,14 +35,14 @@ fn TestAddMethod(a: i32, b: i32) -> i32 { return a.(AddMethod)(b); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "method_vs_nonmethod.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestAddNonmethod", linkageName: "_CTestAddNonmethod.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "method_vs_nonmethod.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestAddNonmethod", linkageName: "_CTestAddNonmethod.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -51,7 +51,7 @@ fn TestAddMethod(a: i32, b: i32) -> i32 { return a.(AddMethod)(b); } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 53, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 16, column: 46, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestAddMethod", linkageName: "_CTestAddMethod.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "TestAddMethod", linkageName: "_CTestAddMethod.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !13, type: !7) diff --git a/toolchain/lower/testdata/builtins/no_op.carbon b/toolchain/lower/testdata/builtins/no_op.carbon index aacfb3cf1765..9d1f3cfa6696 100644 --- a/toolchain/lower/testdata/builtins/no_op.carbon +++ b/toolchain/lower/testdata/builtins/no_op.carbon @@ -76,22 +76,22 @@ fn J() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_op.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_op.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 17, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 22, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 23, column: 3, scope: !8) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 27, column: 3, scope: !11) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "J", linkageName: "_CJ.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "J", linkageName: "_CJ.Main", scope: null, file: !1, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DILocation(line: 33, column: 9, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 32, column: 1, scope: !13) diff --git a/toolchain/lower/testdata/builtins/overloaded_operator.carbon b/toolchain/lower/testdata/builtins/overloaded_operator.carbon index b423ee39e58f..03cab530fb6f 100644 --- a/toolchain/lower/testdata/builtins/overloaded_operator.carbon +++ b/toolchain/lower/testdata/builtins/overloaded_operator.carbon @@ -27,14 +27,14 @@ fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "overloaded_operator.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AddThreeIntegers", linkageName: "_CAddThreeIntegers.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "overloaded_operator.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AddThreeIntegers", linkageName: "_CAddThreeIntegers.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/builtins/pointer.carbon b/toolchain/lower/testdata/builtins/pointer.carbon index 16366ea31b0a..23c668fe41a1 100644 --- a/toolchain/lower/testdata/builtins/pointer.carbon +++ b/toolchain/lower/testdata/builtins/pointer.carbon @@ -42,19 +42,19 @@ fn Check(p: MakeUnformed(C*)) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "pointer.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Null", linkageName: "_CNull.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pointer.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Null", linkageName: "_CNull.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 20, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Check", linkageName: "_CCheck.Main", scope: null, file: !3, line: 23, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Check", linkageName: "_CCheck.Main", scope: null, file: !1, line: 23, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{!7, !7} // CHECK:STDOUT: !12 = !{!13} diff --git a/toolchain/lower/testdata/builtins/print_read.carbon b/toolchain/lower/testdata/builtins/print_read.carbon index e7db358a20e7..46e7db3f5f3b 100644 --- a/toolchain/lower/testdata/builtins/print_read.carbon +++ b/toolchain/lower/testdata/builtins/print_read.carbon @@ -70,14 +70,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "print_read.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "print_read.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 19, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/builtins/types.carbon b/toolchain/lower/testdata/builtins/types.carbon index e22ce80285c5..c3baa1a09bb9 100644 --- a/toolchain/lower/testdata/builtins/types.carbon +++ b/toolchain/lower/testdata/builtins/types.carbon @@ -53,14 +53,14 @@ fn Uses() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "types.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Uses", linkageName: "_CUses.Main", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "types.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Uses", linkageName: "_CUses.Main", scope: null, file: !1, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 31, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/builtins/uint.carbon b/toolchain/lower/testdata/builtins/uint.carbon index a623a2a9d6a3..06cdd5b61bf2 100644 --- a/toolchain/lower/testdata/builtins/uint.carbon +++ b/toolchain/lower/testdata/builtins/uint.carbon @@ -195,14 +195,14 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "uint.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "uint.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) @@ -210,7 +210,7 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 39, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 14, column: 32, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!7, !7, !7} // CHECK:STDOUT: !15 = !{!16, !17} @@ -218,66 +218,66 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !12, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 17, column: 44, scope: !12) // CHECK:STDOUT: !19 = !DILocation(line: 17, column: 37, scope: !12) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !1, line: 20, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22, !23} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !23 = !DILocalVariable(arg: 2, scope: !20, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 44, scope: !20) // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 37, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !1, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28, !29} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !26, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 23, column: 44, scope: !26) // CHECK:STDOUT: !31 = !DILocation(line: 23, column: 37, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !1, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34, !35} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !35 = !DILocalVariable(arg: 2, scope: !32, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 26, column: 44, scope: !32) // CHECK:STDOUT: !37 = !DILocation(line: 26, column: 37, scope: !32) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !3, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "TestMod", linkageName: "_CTestMod.Main", scope: null, file: !1, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40, !41} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 2, scope: !38, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 29, column: 44, scope: !38) // CHECK:STDOUT: !43 = !DILocation(line: 29, column: 37, scope: !38) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "TestComplement", linkageName: "_CTestComplement.Main", scope: null, file: !1, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !7) // CHECK:STDOUT: !47 = !DILocation(line: 32, column: 43, scope: !44) // CHECK:STDOUT: !48 = !DILocation(line: 32, column: 36, scope: !44) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !3, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "TestAnd", linkageName: "_CTestAnd.Main", scope: null, file: !1, line: 35, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51, !52} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !7) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !49, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 35, column: 44, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 35, column: 37, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !3, line: 38, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "TestOr", linkageName: "_CTestOr.Main", scope: null, file: !1, line: 38, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57, !58} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !55, type: !7) // CHECK:STDOUT: !59 = !DILocation(line: 38, column: 43, scope: !55) // CHECK:STDOUT: !60 = !DILocation(line: 38, column: 36, scope: !55) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !3, line: 41, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "TestXor", linkageName: "_CTestXor.Main", scope: null, file: !1, line: 41, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63, !64} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !7) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !61, type: !7) // CHECK:STDOUT: !65 = !DILocation(line: 41, column: 44, scope: !61) // CHECK:STDOUT: !66 = !DILocation(line: 41, column: 37, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !3, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "TestLeftShift", linkageName: "_CTestLeftShift.Main", scope: null, file: !1, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69, !70} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !7) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !67, type: !7) // CHECK:STDOUT: !71 = !DILocation(line: 44, column: 50, scope: !67) // CHECK:STDOUT: !72 = !DILocation(line: 44, column: 43, scope: !67) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestRightShift", linkageName: "_CTestRightShift.Main", scope: null, file: !3, line: 47, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "TestRightShift", linkageName: "_CTestRightShift.Main", scope: null, file: !1, line: 47, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75, !76} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !73, type: !7) // CHECK:STDOUT: !77 = !DILocation(line: 47, column: 51, scope: !73) // CHECK:STDOUT: !78 = !DILocation(line: 47, column: 44, scope: !73) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !3, line: 50, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !1, line: 50, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !80 = !DISubroutineType(types: !81) // CHECK:STDOUT: !81 = !{!82, !7, !7} // CHECK:STDOUT: !82 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -286,31 +286,31 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !79, type: !7) // CHECK:STDOUT: !86 = !DILocation(line: 50, column: 44, scope: !79) // CHECK:STDOUT: !87 = !DILocation(line: 50, column: 37, scope: !79) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !3, line: 53, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !89) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !1, line: 53, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !89) // CHECK:STDOUT: !89 = !{!90, !91} // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !88, type: !7) // CHECK:STDOUT: !91 = !DILocalVariable(arg: 2, scope: !88, type: !7) // CHECK:STDOUT: !92 = !DILocation(line: 53, column: 45, scope: !88) // CHECK:STDOUT: !93 = !DILocation(line: 53, column: 38, scope: !88) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !3, line: 56, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !95) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !1, line: 56, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !95) // CHECK:STDOUT: !95 = !{!96, !97} // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !94, type: !7) // CHECK:STDOUT: !97 = !DILocalVariable(arg: 2, scope: !94, type: !7) // CHECK:STDOUT: !98 = !DILocation(line: 56, column: 46, scope: !94) // CHECK:STDOUT: !99 = !DILocation(line: 56, column: 39, scope: !94) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !3, line: 59, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !101) +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !1, line: 59, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !101) // CHECK:STDOUT: !101 = !{!102, !103} // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !100, type: !7) // CHECK:STDOUT: !103 = !DILocalVariable(arg: 2, scope: !100, type: !7) // CHECK:STDOUT: !104 = !DILocation(line: 59, column: 48, scope: !100) // CHECK:STDOUT: !105 = !DILocation(line: 59, column: 41, scope: !100) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !3, line: 62, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !107) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !1, line: 62, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !107) // CHECK:STDOUT: !107 = !{!108, !109} // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !106, type: !7) // CHECK:STDOUT: !109 = !DILocalVariable(arg: 2, scope: !106, type: !7) // CHECK:STDOUT: !110 = !DILocation(line: 62, column: 49, scope: !106) // CHECK:STDOUT: !111 = !DILocation(line: 62, column: 42, scope: !106) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !3, line: 65, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !113) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !1, line: 65, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !113 = !{!114, !115} // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !112, type: !7) // CHECK:STDOUT: !115 = !DILocalVariable(arg: 2, scope: !112, type: !7) diff --git a/toolchain/lower/testdata/choice/basic.carbon b/toolchain/lower/testdata/choice/basic.carbon index 29dc5cf5ed22..3f3686beb15f 100644 --- a/toolchain/lower/testdata/choice/basic.carbon +++ b/toolchain/lower/testdata/choice/basic.carbon @@ -46,16 +46,16 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 21, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 0, scope: !8) diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index 038f595e664d..a76984a16124 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -130,23 +130,23 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "adapt_class.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairOfInts.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "adapt_class.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairOfInts.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 9, column: 12, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 9, column: 5, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairAdapter.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairAdapter.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 12, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 17, column: 5, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.PairAdapter.Main", scope: null, file: !3, line: 20, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.PairAdapter.Main", scope: null, file: !1, line: 20, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!16, !7} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -154,30 +154,30 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !19 = !DILocation(line: 22, column: 12, scope: !13) // CHECK:STDOUT: !20 = !DILocation(line: 22, column: 5, scope: !13) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !3, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !1, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{!16} // CHECK:STDOUT: !24 = !DILocation(line: 27, column: 3, scope: !21) // CHECK:STDOUT: !25 = !DILocation(line: 27, column: 25, scope: !21) // CHECK:STDOUT: !26 = !DILocation(line: 28, column: 10, scope: !21) // CHECK:STDOUT: !27 = !DILocation(line: 28, column: 3, scope: !21) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !16} // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !16) // CHECK:STDOUT: !33 = !DILocation(line: 27, column: 3, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !3, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !1, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{null, !7} // CHECK:STDOUT: !37 = !{!38} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !39 = !DILocation(line: 27, column: 3, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c0f3aeca38cdfaa6:core.Destroy.Core", scope: null, file: !3, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c0f3aeca38cdfaa6:core.Destroy.Core", scope: null, file: !1, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !7) // CHECK:STDOUT: !43 = !DILocation(line: 27, column: 3, scope: !40) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d8149a936c4ca850:core.Destroy.Core", scope: null, file: !3, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d8149a936c4ca850:core.Destroy.Core", scope: null, file: !1, line: 27, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !7) // CHECK:STDOUT: !47 = !DILocation(line: 27, column: 3, scope: !44) @@ -199,21 +199,21 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "adapt_int.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "adapt_int.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 8, column: 27, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !14 = !DILocation(line: 13, column: 10, scope: !11) diff --git a/toolchain/lower/testdata/class/base.carbon b/toolchain/lower/testdata/class/base.carbon index 4bcbd2c1a18b..b3a1371aebde 100644 --- a/toolchain/lower/testdata/class/base.carbon +++ b/toolchain/lower/testdata/class/base.carbon @@ -75,21 +75,21 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "base.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "base.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 24, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 24, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 24, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.Main", scope: null, file: !3, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Access", linkageName: "_CAccess.Main", scope: null, file: !1, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7, !7} // CHECK:STDOUT: !14 = !{!15} @@ -98,7 +98,7 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: !17 = !DILocation(line: 28, column: 16, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 28, column: 10, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 28, column: 3, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !3, line: 31, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !1, line: 31, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !23 = !DILocation(line: 32, column: 3, scope: !20) diff --git a/toolchain/lower/testdata/class/basic.carbon b/toolchain/lower/testdata/class/basic.carbon index ef31f8c95812..f958a203d2a2 100644 --- a/toolchain/lower/testdata/class/basic.carbon +++ b/toolchain/lower/testdata/class/basic.carbon @@ -68,14 +68,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -83,20 +83,20 @@ fn Run() { // CHECK:STDOUT: !9 = !DILocation(line: 22, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 22, column: 14, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 20, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 22, column: 3, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ea803f2c6cd45773:core.Destroy.Core", scope: null, file: !3, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ea803f2c6cd45773:core.Destroy.Core", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 22, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 22, column: 3, scope: !25) diff --git a/toolchain/lower/testdata/class/convert.carbon b/toolchain/lower/testdata/class/convert.carbon index 795701c39f4f..9af3224f3efe 100644 --- a/toolchain/lower/testdata/class/convert.carbon +++ b/toolchain/lower/testdata/class/convert.carbon @@ -84,14 +84,14 @@ fn DoIt() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.IntWrapper.Main:ImplicitAs.84588f41d61dafba.Core", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.IntWrapper.Main:ImplicitAs.84588f41d61dafba.Core", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -100,13 +100,13 @@ fn DoIt() { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 18, column: 36, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 29, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Consume", linkageName: "_CConsume.Main", scope: null, file: !3, line: 21, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Consume", linkageName: "_CConsume.Main", scope: null, file: !1, line: 21, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 21, column: 1, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "DoIt", linkageName: "_CDoIt.Main", scope: null, file: !3, line: 23, type: !20, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "DoIt", linkageName: "_CDoIt.Main", scope: null, file: !1, line: 23, type: !20, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DILocation(line: 24, column: 3, scope: !19) @@ -114,17 +114,17 @@ fn DoIt() { // CHECK:STDOUT: !24 = !DILocation(line: 25, column: 11, scope: !19) // CHECK:STDOUT: !25 = !DILocation(line: 25, column: 3, scope: !19) // CHECK:STDOUT: !26 = !DILocation(line: 23, column: 1, scope: !19) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 24, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 24, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 24, column: 3, scope: !27) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37a87c905b8e15fc:core.Destroy.Core", scope: null, file: !3, line: 24, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37a87c905b8e15fc:core.Destroy.Core", scope: null, file: !1, line: 24, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{null, !8} // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !31, type: !8) // CHECK:STDOUT: !36 = !DILocation(line: 24, column: 3, scope: !31) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b7000563f5308067:core.Destroy.Core", scope: null, file: !3, line: 24, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b7000563f5308067:core.Destroy.Core", scope: null, file: !1, line: 24, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !8) // CHECK:STDOUT: !40 = !DILocation(line: 24, column: 3, scope: !37) diff --git a/toolchain/lower/testdata/class/field.carbon b/toolchain/lower/testdata/class/field.carbon index 0296736e39b0..bea3e25794ce 100644 --- a/toolchain/lower/testdata/class/field.carbon +++ b/toolchain/lower/testdata/class/field.carbon @@ -119,14 +119,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -136,7 +136,7 @@ fn Run() { // CHECK:STDOUT: !11 = !DILocation(line: 10, column: 12, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 10, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 10, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !15, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{!7} // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 3, scope: !14) @@ -144,19 +144,19 @@ fn Run() { // CHECK:STDOUT: !19 = !DILocation(line: 16, column: 3, scope: !14) // CHECK:STDOUT: !20 = !DILocation(line: 17, column: 10, scope: !14) // CHECK:STDOUT: !21 = !DILocation(line: 17, column: 3, scope: !14) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !7} // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !22, type: !7) // CHECK:STDOUT: !27 = !DILocation(line: 14, column: 3, scope: !22) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ea803f2c6cd45773:core.Destroy.Core", scope: null, file: !3, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ea803f2c6cd45773:core.Destroy.Core", scope: null, file: !1, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !8} // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !8) // CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !8) // CHECK:STDOUT: !37 = !DILocation(line: 14, column: 3, scope: !34) @@ -211,14 +211,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "inplace_init_with_nonconst.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "inplace_init_with_nonconst.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -226,18 +226,18 @@ fn Run() { // CHECK:STDOUT: !9 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 16, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 11, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7de30cbaf2d51cc9:core.Destroy.Core", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7de30cbaf2d51cc9:core.Destroy.Core", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 15, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.43b4849b6b52200b:core.Destroy.Core", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.43b4849b6b52200b:core.Destroy.Core", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !15) // CHECK:STDOUT: !22 = !DILocation(line: 15, column: 3, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de39dc1884f85a7d:core.Destroy.Core", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de39dc1884f85a7d:core.Destroy.Core", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !23, type: !15) // CHECK:STDOUT: !26 = !DILocation(line: 15, column: 3, scope: !23) @@ -305,14 +305,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -321,28 +321,28 @@ fn Run() { // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 16, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 31, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 17, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61192482fe52095a:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61192482fe52095a:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 17, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7de30cbaf2d51cc9:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7de30cbaf2d51cc9:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !22) // CHECK:STDOUT: !29 = !DILocation(line: 17, column: 3, scope: !26) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.43b4849b6b52200b:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.43b4849b6b52200b:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !22) // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 3, scope: !30) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de39dc1884f85a7d:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de39dc1884f85a7d:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !22) // CHECK:STDOUT: !37 = !DILocation(line: 17, column: 3, scope: !34) diff --git a/toolchain/lower/testdata/class/field_initializer.carbon b/toolchain/lower/testdata/class/field_initializer.carbon index 66c8a5d6c746..5f71b99b196a 100644 --- a/toolchain/lower/testdata/class/field_initializer.carbon +++ b/toolchain/lower/testdata/class/field_initializer.carbon @@ -39,14 +39,14 @@ var c: C = {}; // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "field_initializer.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "field_initializer.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index 54133ac517af..91726ba039e2 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -105,13 +105,13 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: ; ModuleID = 'classes.carbon' // CHECK:STDOUT: source_filename = "classes.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "classes.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "classes.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'create.carbon' // CHECK:STDOUT: source_filename = "create.carbon" // CHECK:STDOUT: @@ -140,21 +140,21 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "create.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CreateDerived", linkageName: "_CCreateDerived.Create", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "create.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CreateDerived", linkageName: "_CCreateDerived.Create", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CreateAdapter", linkageName: "_CCreateAdapter.Create", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CreateAdapter", linkageName: "_CCreateAdapter.Create", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 11, column: 10, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 11, column: 3, scope: !11) // CHECK:STDOUT: ; ModuleID = 'create_generic.carbon' @@ -229,26 +229,26 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "create_generic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Ints", linkageName: "_CInts.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "create_generic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Ints", linkageName: "_CInts.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Empty", linkageName: "_CEmpty.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Empty", linkageName: "_CEmpty.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 18, column: 10, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 3, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Tuples", linkageName: "_CTuples.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Tuples", linkageName: "_CTuples.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DILocation(line: 23, column: 10, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 23, column: 3, scope: !13) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.5bd8d5767580997a", scope: null, file: !3, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.5bd8d5767580997a", scope: null, file: !1, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{!7, !19, !19} // CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -257,10 +257,10 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !22 = !DILocalVariable(arg: 2, scope: !16, type: !19) // CHECK:STDOUT: !23 = !DILocation(line: 10, column: 10, scope: !16) // CHECK:STDOUT: !24 = !DILocation(line: 10, column: 3, scope: !16) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.b5489de296f1d78c", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.b5489de296f1d78c", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DILocation(line: 10, column: 10, scope: !25) // CHECK:STDOUT: !27 = !DILocation(line: 10, column: 3, scope: !25) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.b40acb5dac24e7cb", scope: null, file: !3, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.b40acb5dac24e7cb", scope: null, file: !1, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{!7, !7, !7} // CHECK:STDOUT: !31 = !{!32, !33} @@ -270,7 +270,7 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !35 = !DILocation(line: 10, column: 16, scope: !28) // CHECK:STDOUT: !36 = !DILocation(line: 10, column: 24, scope: !28) // CHECK:STDOUT: !37 = !DILocation(line: 10, column: 3, scope: !28) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.58bedf1100cb91a8", scope: null, file: !39, line: 52, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.58bedf1100cb91a8", scope: null, file: !39, line: 52, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !39 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{!7, !7} @@ -452,14 +452,14 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -467,88 +467,88 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 19, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4a778eace557e64e:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4a778eace557e64e:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !7} // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 16, column: 3, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3aba0d07ef538256:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3aba0d07ef538256:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 16, column: 3, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !3, line: 20, type: !30, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !1, line: 20, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{!15} // CHECK:STDOUT: !32 = !DILocation(line: 21, column: 3, scope: !29) // CHECK:STDOUT: !33 = !DILocation(line: 21, column: 19, scope: !29) // CHECK:STDOUT: !34 = !DILocation(line: 22, column: 10, scope: !29) // CHECK:STDOUT: !35 = !DILocation(line: 22, column: 3, scope: !29) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !3, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !1, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !37 = !DISubroutineType(types: !38) // CHECK:STDOUT: !38 = !{null} // CHECK:STDOUT: !39 = !DILocation(line: 26, column: 3, scope: !36) // CHECK:STDOUT: !40 = !DILocation(line: 26, column: 18, scope: !36) // CHECK:STDOUT: !41 = !DILocation(line: 27, column: 10, scope: !36) // CHECK:STDOUT: !42 = !DILocation(line: 27, column: 3, scope: !36) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.13efda571ed6c7c5:core.Destroy.Core", scope: null, file: !3, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.13efda571ed6c7c5:core.Destroy.Core", scope: null, file: !1, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 26, column: 3, scope: !43) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.072140aa01ab1557:core.Destroy.Core", scope: null, file: !3, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.072140aa01ab1557:core.Destroy.Core", scope: null, file: !1, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !48) // CHECK:STDOUT: !48 = !{!49} // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !7) // CHECK:STDOUT: !50 = !DILocation(line: 26, column: 3, scope: !47) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !1, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !52 = !DILocation(line: 31, column: 3, scope: !51) // CHECK:STDOUT: !53 = !DILocation(line: 31, column: 31, scope: !51) // CHECK:STDOUT: !54 = !DILocation(line: 31, column: 48, scope: !51) // CHECK:STDOUT: !55 = !DILocation(line: 32, column: 10, scope: !51) // CHECK:STDOUT: !56 = !DILocation(line: 32, column: 3, scope: !51) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !58) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !58 = !{!59} // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !57, type: !7) // CHECK:STDOUT: !60 = !DILocation(line: 31, column: 3, scope: !57) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bbcdb878140d0286:core.Destroy.Core", scope: null, file: !3, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bbcdb878140d0286:core.Destroy.Core", scope: null, file: !1, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !7) // CHECK:STDOUT: !64 = !DILocation(line: 31, column: 3, scope: !61) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.15acfaef2fd61051:core.Destroy.Core", scope: null, file: !3, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.15acfaef2fd61051:core.Destroy.Core", scope: null, file: !1, line: 31, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !66) // CHECK:STDOUT: !66 = !{!67} // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !65, type: !7) // CHECK:STDOUT: !68 = !DILocation(line: 31, column: 3, scope: !65) -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.5bd8d5767580997a", scope: null, file: !3, line: 5, type: !70, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.5bd8d5767580997a", scope: null, file: !1, line: 5, type: !70, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !72) // CHECK:STDOUT: !70 = !DISubroutineType(types: !71) // CHECK:STDOUT: !71 = !{!7, !7} // CHECK:STDOUT: !72 = !{!73} // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !69, type: !7) // CHECK:STDOUT: !74 = !DILocation(line: 6, column: 12, scope: !69) // CHECK:STDOUT: !75 = !DILocation(line: 6, column: 5, scope: !69) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.5bd8d5767580997a", scope: null, file: !3, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.5bd8d5767580997a", scope: null, file: !1, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !79) // CHECK:STDOUT: !77 = !DISubroutineType(types: !78) // CHECK:STDOUT: !78 = !{!15, !7} // CHECK:STDOUT: !79 = !{!80} // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !76, type: !7) // CHECK:STDOUT: !81 = !DILocation(line: 9, column: 12, scope: !76) // CHECK:STDOUT: !82 = !DILocation(line: 9, column: 5, scope: !76) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.b5489de296f1d78c", scope: null, file: !3, line: 8, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !84) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.b5489de296f1d78c", scope: null, file: !1, line: 8, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !84) // CHECK:STDOUT: !84 = !{!85} // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !83, type: !7) // CHECK:STDOUT: !86 = !DILocation(line: 9, column: 12, scope: !83) // CHECK:STDOUT: !87 = !DILocation(line: 9, column: 5, scope: !83) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.5821f27978434434", scope: null, file: !3, line: 8, type: !70, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !89) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.5821f27978434434", scope: null, file: !1, line: 8, type: !70, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !89) // CHECK:STDOUT: !89 = !{!90} // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !88, type: !7) // CHECK:STDOUT: !91 = !DILocation(line: 9, column: 12, scope: !88) // CHECK:STDOUT: !92 = !DILocation(line: 9, column: 5, scope: !88) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.f23c1a2465d2ad7f", scope: null, file: !94, line: 58, type: !70, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !95) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.f23c1a2465d2ad7f", scope: null, file: !94, line: 58, type: !70, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !95) // CHECK:STDOUT: !94 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") // CHECK:STDOUT: !95 = !{!96} // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !93, type: !7) diff --git a/toolchain/lower/testdata/class/import.carbon b/toolchain/lower/testdata/class/import.carbon index 948427326693..336dae78a2e8 100644 --- a/toolchain/lower/testdata/class/import.carbon +++ b/toolchain/lower/testdata/class/import.carbon @@ -32,13 +32,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.C.Main() // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: @@ -53,14 +53,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/class/method.carbon b/toolchain/lower/testdata/class/method.carbon index 1bc45cb67344..644ab6b62c02 100644 --- a/toolchain/lower/testdata/class/method.carbon +++ b/toolchain/lower/testdata/class/method.carbon @@ -39,14 +39,14 @@ fn F(p: C*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "method.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "method.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/class/self.carbon b/toolchain/lower/testdata/class/self.carbon index 8e67a02fe3e9..9eeeecede019 100644 --- a/toolchain/lower/testdata/class/self.carbon +++ b/toolchain/lower/testdata/class/self.carbon @@ -46,14 +46,14 @@ fn C.Set(ref self: C) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "self.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.C.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "self.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.C.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -62,7 +62,7 @@ fn C.Set(ref self: C) { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 21, column: 10, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 21, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Set", linkageName: "_CSet.C.Main", scope: null, file: !3, line: 24, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Set", linkageName: "_CSet.C.Main", scope: null, file: !1, line: 24, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !8} // CHECK:STDOUT: !16 = !{!17} diff --git a/toolchain/lower/testdata/class/static.carbon b/toolchain/lower/testdata/class/static.carbon index 2fc0aa0319e0..393fbe48cca3 100644 --- a/toolchain/lower/testdata/class/static.carbon +++ b/toolchain/lower/testdata/class/static.carbon @@ -66,20 +66,20 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "static.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "static.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 8, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 10, scope: !10) // CHECK:STDOUT: !13 = !DILocation(line: 0, scope: !10) @@ -129,39 +129,39 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "static_export.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "static_export.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !6, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !1, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 4, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !6, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !21 = !DILocation(line: 4, column: 1, scope: !18) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !26 = !DILocation(line: 15, column: 10, scope: !22) // CHECK:STDOUT: !27 = !DILocation(line: 15, column: 3, scope: !22) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !29, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !29, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null} // CHECK:STDOUT: !31 = !DILocation(line: 5, column: 10, scope: !28) diff --git a/toolchain/lower/testdata/class/value_access.carbon b/toolchain/lower/testdata/class/value_access.carbon index 4352396e22d0..85660511414b 100644 --- a/toolchain/lower/testdata/class/value_access.carbon +++ b/toolchain/lower/testdata/class/value_access.carbon @@ -53,14 +53,14 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "value_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "value_access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index d16b1503550b..1291a1811df4 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -240,25 +240,25 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "classes.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Intermediate.Classes", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "classes.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Intermediate.Classes", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 9, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Derived.Classes", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Derived.Classes", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !14 = !DILocation(line: 14, column: 3, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn:thunk:Intermediate.Classes:Derived.Classes", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn:thunk:Intermediate.Classes:Derived.Classes", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !15, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 14, column: 3, scope: !15) @@ -361,14 +361,14 @@ fn Use() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "create.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Create", linkageName: "_CCreate.Create", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "create.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Create", linkageName: "_CCreate.Create", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) @@ -379,30 +379,30 @@ fn Use() { // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 28, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 9, column: 37, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 1, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.599adb417fbfaec7:core.Destroy.Core", scope: null, file: !3, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.599adb417fbfaec7:core.Destroy.Core", scope: null, file: !1, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 12, column: 3, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d297a9f344b8c8ea:core.Destroy.Core", scope: null, file: !3, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d297a9f344b8c8ea:core.Destroy.Core", scope: null, file: !1, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !18) // CHECK:STDOUT: !25 = !DILocation(line: 12, column: 3, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e8db4b946118fdd5:core.Destroy.Core", scope: null, file: !3, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e8db4b946118fdd5:core.Destroy.Core", scope: null, file: !1, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !18) // CHECK:STDOUT: !29 = !DILocation(line: 12, column: 3, scope: !26) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2f0c09c888828711:core.Destroy.Core", scope: null, file: !3, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2f0c09c888828711:core.Destroy.Core", scope: null, file: !1, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !18) // CHECK:STDOUT: !33 = !DILocation(line: 12, column: 3, scope: !30) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f466adf434aa51ac:core.Destroy.Core", scope: null, file: !3, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f466adf434aa51ac:core.Destroy.Core", scope: null, file: !1, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !18) // CHECK:STDOUT: !37 = !DILocation(line: 12, column: 3, scope: !34) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Create", scope: null, file: !3, line: 15, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Create", scope: null, file: !1, line: 15, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !18) // CHECK:STDOUT: !41 = !DILocation(line: 16, column: 3, scope: !38) @@ -479,33 +479,33 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "create_named_ctor.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "MakePartialBase", linkageName: "_CMakePartialBase.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "create_named_ctor.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "MakePartialBase", linkageName: "_CMakePartialBase.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "MakePartialIntermediate", linkageName: "_CMakePartialIntermediate.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "MakePartialIntermediate", linkageName: "_CMakePartialIntermediate.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 11, column: 10, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 11, column: 19, scope: !9) // CHECK:STDOUT: !12 = !DILocation(line: 11, column: 3, scope: !9) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "MakeBase", linkageName: "_CMakeBase.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "MakeBase", linkageName: "_CMakeBase.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DILocation(line: 15, column: 10, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 15, column: 3, scope: !13) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "MakeIntermediate", linkageName: "_CMakeIntermediate.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "MakeIntermediate", linkageName: "_CMakeIntermediate.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 10, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 3, scope: !16) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "MakeDerivedFromPartial", linkageName: "_CMakeDerivedFromPartial.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "MakeDerivedFromPartial", linkageName: "_CMakeDerivedFromPartial.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 23, column: 10, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 23, column: 19, scope: !19) // CHECK:STDOUT: !22 = !DILocation(line: 23, column: 3, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "MakeDerivedFromNonPartial", linkageName: "_CMakeDerivedFromNonPartial.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "MakeDerivedFromNonPartial", linkageName: "_CMakeDerivedFromNonPartial.Main", scope: null, file: !1, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !24 = !DILocation(line: 27, column: 10, scope: !23) // CHECK:STDOUT: !25 = !DILocation(line: 27, column: 19, scope: !23) // CHECK:STDOUT: !26 = !DILocation(line: 27, column: 3, scope: !23) @@ -578,21 +578,21 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "member_init.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Base.MemberInit", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "member_init.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Base.MemberInit", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 6, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.MemberInit", scope: null, file: !3, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.MemberInit", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 10, column: 3, scope: !11) @@ -603,18 +603,18 @@ fn Use() { // CHECK:STDOUT: !19 = !DILocation(line: 12, column: 3, scope: !11) // CHECK:STDOUT: !20 = !DILocation(line: 13, column: 17, scope: !11) // CHECK:STDOUT: !21 = !DILocation(line: 9, column: 1, scope: !11) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !22, type: !25) // CHECK:STDOUT: !28 = !DILocation(line: 13, column: 3, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5b82b67c9fafe78b:core.Destroy.Core", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5b82b67c9fafe78b:core.Destroy.Core", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !7) // CHECK:STDOUT: !32 = !DILocation(line: 13, column: 3, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7bb482f1036bd99d:core.Destroy.Core", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7bb482f1036bd99d:core.Destroy.Core", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 13, column: 3, scope: !33) @@ -675,36 +675,36 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "member_brace_init.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "member_brace_init.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 13, column: 21, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 13, column: 30, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 12, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 13, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !21 = !DILocation(line: 13, column: 3, scope: !18) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !14) // CHECK:STDOUT: !25 = !DILocation(line: 13, column: 3, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !14) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 3, scope: !26) @@ -730,14 +730,14 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -820,21 +820,21 @@ fn Use() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 10, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 14, column: 3, scope: !11) @@ -842,32 +842,32 @@ fn Use() { // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 30, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 3, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 13, column: 1, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 14, column: 3, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !23, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !23) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 14, column: 3, scope: !27) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !7) // CHECK:STDOUT: !34 = !DILocation(line: 14, column: 3, scope: !31) // CHECK:STDOUT: ; ModuleID = 'generic_noop.carbon' // CHECK:STDOUT: source_filename = "generic_noop.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_noop.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_noop.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'generic_use.carbon' // CHECK:STDOUT: source_filename = "generic_use.carbon" // CHECK:STDOUT: @@ -959,14 +959,14 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_use.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_use.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -974,39 +974,39 @@ fn Use() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 21, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 21, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8009891161c13655:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8009891161c13655:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 10, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.065e814291079cc6:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.065e814291079cc6:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !15) // CHECK:STDOUT: !22 = !DILocation(line: 17, column: 10, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ba57a0f0b509ae3c:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ba57a0f0b509ae3c:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !23, type: !15) // CHECK:STDOUT: !26 = !DILocation(line: 17, column: 10, scope: !23) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !15) // CHECK:STDOUT: !30 = !DILocation(line: 17, column: 3, scope: !27) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5a348ab37855d8cb:core.Destroy.Core", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5a348ab37855d8cb:core.Destroy.Core", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !15) // CHECK:STDOUT: !34 = !DILocation(line: 17, column: 3, scope: !31) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2fa34c36769abdda:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2fa34c36769abdda:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !15) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !35) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.9203bf580ba2de56", scope: null, file: !3, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.9203bf580ba2de56", scope: null, file: !1, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !39, type: !15) // CHECK:STDOUT: !42 = !DILocation(line: 6, column: 5, scope: !39) // CHECK:STDOUT: !43 = !DILocation(line: 5, column: 3, scope: !39) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.d35bf058397cdfd9", scope: null, file: !3, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.d35bf058397cdfd9", scope: null, file: !1, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !15) // CHECK:STDOUT: !47 = !DILocation(line: 6, column: 5, scope: !44) @@ -1061,38 +1061,38 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_base.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_base.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null, !12} // CHECK:STDOUT: !12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !9, type: !12) // CHECK:STDOUT: !15 = !DILocation(line: 15, column: 3, scope: !9) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a6c4a4d5e8c13048:core.Destroy.Core", scope: null, file: !3, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a6c4a4d5e8c13048:core.Destroy.Core", scope: null, file: !1, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !16, type: !12) // CHECK:STDOUT: !19 = !DILocation(line: 15, column: 3, scope: !16) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.85c4c37895334278:core.Destroy.Core", scope: null, file: !3, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.85c4c37895334278:core.Destroy.Core", scope: null, file: !1, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !12) // CHECK:STDOUT: !23 = !DILocation(line: 15, column: 3, scope: !20) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !3, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !1, line: 15, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !12) // CHECK:STDOUT: !27 = !DILocation(line: 15, column: 3, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !3, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !1, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !12) // CHECK:STDOUT: !31 = !DILocation(line: 5, column: 3, scope: !28) @@ -1210,14 +1210,14 @@ fn Use() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "thunk.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunk.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -1225,23 +1225,23 @@ fn Use() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 18, column: 5, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !15 = !DILocalVariable(arg: 2, scope: !12, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 3, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 0, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.419398171642b7b7:core.Destroy.Core", scope: null, file: !3, line: 17, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.419398171642b7b7:core.Destroy.Core", scope: null, file: !1, line: 17, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !7} // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !23 = !DILocation(line: 17, column: 3, scope: !18) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.41ca6508118965ec:core.Destroy.Core", scope: null, file: !3, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.41ca6508118965ec:core.Destroy.Core", scope: null, file: !1, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !7) // CHECK:STDOUT: !27 = !DILocation(line: 0, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !3, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !1, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null} // CHECK:STDOUT: !31 = !DILocation(line: 23, column: 3, scope: !28) @@ -1251,19 +1251,19 @@ fn Use() { // CHECK:STDOUT: !35 = !DILocation(line: 23, column: 29, scope: !28) // CHECK:STDOUT: !36 = !DILocation(line: 24, column: 18, scope: !28) // CHECK:STDOUT: !37 = !DILocation(line: 22, column: 1, scope: !28) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !41 = !DILocation(line: 23, column: 3, scope: !38) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !3, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !1, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !43 = !{!44} // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !42, type: !7) // CHECK:STDOUT: !45 = !DILocation(line: 23, column: 3, scope: !42) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !3, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !47) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e1364ec5889efef:core.Destroy.Core", scope: null, file: !1, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !47) // CHECK:STDOUT: !47 = !{!48} // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !46, type: !7) // CHECK:STDOUT: !49 = !DILocation(line: 23, column: 3, scope: !46) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !3, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !51) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !1, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !51 = !{!52} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !50, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 23, column: 3, scope: !50) diff --git a/toolchain/lower/testdata/for/bindings.carbon b/toolchain/lower/testdata/for/bindings.carbon index 3688852070fd..95326cc0c42a 100644 --- a/toolchain/lower/testdata/for/bindings.carbon +++ b/toolchain/lower/testdata/for/bindings.carbon @@ -206,14 +206,14 @@ fn For() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "bindings.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "bindings.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !1, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 27, column: 3, scope: !4) @@ -222,49 +222,49 @@ fn For() { // CHECK:STDOUT: !10 = !DILocation(line: 30, column: 5, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 29, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 26, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 27, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 27, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 27, column: 10, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 27, column: 10, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5172fb5622df6926:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5172fb5622df6926:core.Destroy.Core", scope: null, file: !1, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !23) // CHECK:STDOUT: !30 = !DILocation(line: 29, column: 7, scope: !27) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.938741932578d142:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.938741932578d142:core.Destroy.Core", scope: null, file: !1, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !23) // CHECK:STDOUT: !34 = !DILocation(line: 29, column: 7, scope: !31) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b935d6615b90a01b:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b935d6615b90a01b:core.Destroy.Core", scope: null, file: !1, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !23) // CHECK:STDOUT: !38 = !DILocation(line: 29, column: 7, scope: !35) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.854750c92287bb79:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.854750c92287bb79:core.Destroy.Core", scope: null, file: !1, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !39, type: !23) // CHECK:STDOUT: !42 = !DILocation(line: 29, column: 7, scope: !39) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.72fec7d6e0df4c57:core.Destroy.Core", scope: null, file: !3, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.72fec7d6e0df4c57:core.Destroy.Core", scope: null, file: !1, line: 29, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !23) // CHECK:STDOUT: !46 = !DILocation(line: 29, column: 7, scope: !43) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.88c97397fb274b67:core.Destroy.Core", scope: null, file: !3, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.88c97397fb274b67:core.Destroy.Core", scope: null, file: !1, line: 27, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !48) // CHECK:STDOUT: !48 = !{!49} // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !23) // CHECK:STDOUT: !50 = !DILocation(line: 27, column: 3, scope: !47) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.c9f733d9bf35d2e5", scope: null, file: !3, line: 15, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !52) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.c9f733d9bf35d2e5", scope: null, file: !1, line: 15, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52) // CHECK:STDOUT: !52 = !{!53} // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !23) // CHECK:STDOUT: !54 = !DILocation(line: 16, column: 7, scope: !51) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.c9f733d9bf35d2e5", scope: null, file: !3, line: 18, type: !56, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.c9f733d9bf35d2e5", scope: null, file: !1, line: 18, type: !56, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !56 = !DISubroutineType(types: !57) // CHECK:STDOUT: !57 = !{!23, !23, !23} // CHECK:STDOUT: !58 = !{!59, !60} @@ -272,7 +272,7 @@ fn For() { // CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !55, type: !23) // CHECK:STDOUT: !61 = !DILocation(line: 19, column: 14, scope: !55) // CHECK:STDOUT: !62 = !DILocation(line: 19, column: 7, scope: !55) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 36, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !67) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 36, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !67) // CHECK:STDOUT: !64 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !65 = !DISubroutineType(types: !66) // CHECK:STDOUT: !66 = !{!23, !23} @@ -280,30 +280,30 @@ fn For() { // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !63, type: !23) // CHECK:STDOUT: !69 = !DILocation(line: 37, column: 12, scope: !63) // CHECK:STDOUT: !70 = !DILocation(line: 37, column: 5, scope: !63) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 39, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 39, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !72) // CHECK:STDOUT: !72 = !{!73} // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !71, type: !23) // CHECK:STDOUT: !74 = !DILocation(line: 40, column: 12, scope: !71) // CHECK:STDOUT: !75 = !DILocation(line: 40, column: 5, scope: !71) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 30, type: !77, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.66b735e0a187b4e4", scope: null, file: !64, line: 30, type: !77, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !77 = !DISubroutineType(types: !78) // CHECK:STDOUT: !78 = !{!23} // CHECK:STDOUT: !79 = !DILocation(line: 31, column: 12, scope: !76) // CHECK:STDOUT: !80 = !DILocation(line: 31, column: 5, scope: !76) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 141, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 141, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !82) // CHECK:STDOUT: !82 = !{!83} // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !81, type: !23) // CHECK:STDOUT: !84 = !DILocation(line: 142, column: 12, scope: !81) // CHECK:STDOUT: !85 = !DILocation(line: 142, column: 5, scope: !81) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 144, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !87) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 144, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !87) // CHECK:STDOUT: !87 = !{!88} // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !86, type: !23) // CHECK:STDOUT: !89 = !DILocation(line: 145, column: 12, scope: !86) // CHECK:STDOUT: !90 = !DILocation(line: 145, column: 5, scope: !86) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 125, type: !77, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.c9f733d9bf35d2e5", scope: null, file: !64, line: 125, type: !77, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !92 = !DILocation(line: 128, column: 5, scope: !91) // CHECK:STDOUT: !93 = !DILocation(line: 129, column: 5, scope: !91) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.58bedf1100cb91a8", scope: null, file: !95, line: 62, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !96) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.58bedf1100cb91a8", scope: null, file: !95, line: 62, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !96) // CHECK:STDOUT: !95 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") // CHECK:STDOUT: !96 = !{!97} // CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !94, type: !23) diff --git a/toolchain/lower/testdata/for/break_continue.carbon b/toolchain/lower/testdata/for/break_continue.carbon index 2878dfae5aa9..ee70b131527d 100644 --- a/toolchain/lower/testdata/for/break_continue.carbon +++ b/toolchain/lower/testdata/for/break_continue.carbon @@ -255,14 +255,14 @@ fn For() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "break_continue.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "break_continue.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 18, scope: !4) @@ -276,7 +276,7 @@ fn For() { // CHECK:STDOUT: !15 = !DILocation(line: 23, column: 5, scope: !4) // CHECK:STDOUT: !16 = !DILocation(line: 20, column: 3, scope: !4) // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 1, scope: !4) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !19, line: 24, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !19, line: 24, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !19 = !DIFile(filename: "{{.*}}/range.carbon", directory: "") // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} @@ -284,45 +284,45 @@ fn For() { // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !18, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 24, column: 39, scope: !18) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !29} // CHECK:STDOUT: !29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !26, type: !29) // CHECK:STDOUT: !32 = !DILocation(line: 20, column: 7, scope: !26) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !3, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !1, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !22) // CHECK:STDOUT: !36 = !DILocation(line: 20, column: 7, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !29) // CHECK:STDOUT: !40 = !DILocation(line: 20, column: 7, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.278d9a31079e7ff2:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.278d9a31079e7ff2:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !29) // CHECK:STDOUT: !44 = !DILocation(line: 20, column: 7, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab3effcb00e348a7:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab3effcb00e348a7:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !29) // CHECK:STDOUT: !48 = !DILocation(line: 20, column: 7, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.db43fa38232c28dd:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.db43fa38232c28dd:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !29) // CHECK:STDOUT: !52 = !DILocation(line: 20, column: 18, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0d5da2659ce22e5f:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0d5da2659ce22e5f:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !29) // CHECK:STDOUT: !56 = !DILocation(line: 20, column: 18, scope: !53) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !19, line: 25, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !19, line: 25, type: !58, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !60) // CHECK:STDOUT: !58 = !DISubroutineType(types: !59) // CHECK:STDOUT: !59 = !{!22, !29} // CHECK:STDOUT: !60 = !{!61} // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !57, type: !29) // CHECK:STDOUT: !62 = !DILocation(line: 25, column: 43, scope: !57) // CHECK:STDOUT: !63 = !DILocation(line: 25, column: 36, scope: !57) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !19, line: 26, type: !65, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !19, line: 26, type: !65, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !67) // CHECK:STDOUT: !65 = !DISubroutineType(types: !66) // CHECK:STDOUT: !66 = !{!29, !29, !29} // CHECK:STDOUT: !67 = !{!68, !69} @@ -339,7 +339,7 @@ fn For() { // CHECK:STDOUT: !78 = !DILocation(line: 30, column: 9, scope: !64) // CHECK:STDOUT: !79 = !DILocation(line: 32, column: 16, scope: !64) // CHECK:STDOUT: !80 = !DILocation(line: 32, column: 9, scope: !64) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 36, type: !83, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !85) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 36, type: !83, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !85) // CHECK:STDOUT: !82 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !83 = !DISubroutineType(types: !84) // CHECK:STDOUT: !84 = !{!29, !29} @@ -347,40 +347,40 @@ fn For() { // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !81, type: !29) // CHECK:STDOUT: !87 = !DILocation(line: 37, column: 12, scope: !81) // CHECK:STDOUT: !88 = !DILocation(line: 37, column: 5, scope: !81) -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 39, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !90) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 39, type: !58, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !90) // CHECK:STDOUT: !90 = !{!91} // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !89, type: !29) // CHECK:STDOUT: !92 = !DILocation(line: 40, column: 12, scope: !89) // CHECK:STDOUT: !93 = !DILocation(line: 40, column: 5, scope: !89) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !95, line: 396, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !96) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !95, line: 396, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !96) // CHECK:STDOUT: !95 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !96 = !{!97} // CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !94, type: !22) // CHECK:STDOUT: !98 = !DILocation(line: 398, column: 5, scope: !94) // CHECK:STDOUT: !99 = !DILocation(line: 396, column: 3, scope: !94) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 33, type: !101, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !103) +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 33, type: !101, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !103) // CHECK:STDOUT: !101 = !DISubroutineType(types: !102) // CHECK:STDOUT: !102 = !{!29, !22} // CHECK:STDOUT: !103 = !{!104} // CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !100, type: !22) // CHECK:STDOUT: !105 = !DILocation(line: 34, column: 12, scope: !100) // CHECK:STDOUT: !106 = !DILocation(line: 34, column: 5, scope: !100) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 30, type: !108, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.95ac245efc335d3f", scope: null, file: !82, line: 30, type: !108, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !108 = !DISubroutineType(types: !109) // CHECK:STDOUT: !109 = !{!29} // CHECK:STDOUT: !110 = !DILocation(line: 31, column: 12, scope: !107) // CHECK:STDOUT: !111 = !DILocation(line: 31, column: 5, scope: !107) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 141, type: !83, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !113) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 141, type: !83, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !113 = !{!114} // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !112, type: !29) // CHECK:STDOUT: !115 = !DILocation(line: 142, column: 12, scope: !112) // CHECK:STDOUT: !116 = !DILocation(line: 142, column: 5, scope: !112) -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 144, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !118) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 144, type: !58, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !118) // CHECK:STDOUT: !118 = !{!119} // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !117, type: !29) // CHECK:STDOUT: !120 = !DILocation(line: 145, column: 12, scope: !117) // CHECK:STDOUT: !121 = !DILocation(line: 145, column: 5, scope: !117) -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.d395a13f81aa0e29.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !95, line: 331, type: !123, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !125) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.d395a13f81aa0e29.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !95, line: 331, type: !123, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !125) // CHECK:STDOUT: !123 = !DISubroutineType(types: !124) // CHECK:STDOUT: !124 = !{null, !22, !22} // CHECK:STDOUT: !125 = !{!126, !127} @@ -388,23 +388,23 @@ fn For() { // CHECK:STDOUT: !127 = !DILocalVariable(arg: 2, scope: !122, type: !22) // CHECK:STDOUT: !128 = !DILocation(line: 0, scope: !122) // CHECK:STDOUT: !129 = !DILocation(line: 331, column: 3, scope: !122) -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 131, type: !101, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !131) +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 131, type: !101, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !131) // CHECK:STDOUT: !131 = !{!132} // CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !130, type: !22) // CHECK:STDOUT: !133 = !DILocation(line: 137, column: 5, scope: !130) // CHECK:STDOUT: !134 = !DILocation(line: 138, column: 5, scope: !130) // CHECK:STDOUT: !135 = !DILocation(line: 139, column: 5, scope: !130) -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 125, type: !108, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !82, line: 125, type: !108, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !137 = !DILocation(line: 128, column: 5, scope: !136) // CHECK:STDOUT: !138 = !DILocation(line: 129, column: 5, scope: !136) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !95, line: 64, type: !140, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !142) +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !95, line: 64, type: !140, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !142) // CHECK:STDOUT: !140 = !DISubroutineType(types: !141) // CHECK:STDOUT: !141 = !{!22, !22} // CHECK:STDOUT: !142 = !{!143} // CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !139, type: !22) // CHECK:STDOUT: !144 = !DILocation(line: 66, column: 17, scope: !139) // CHECK:STDOUT: !145 = !DILocation(line: 66, column: 5, scope: !139) -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !95, line: 59, type: !140, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !147) +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !95, line: 59, type: !140, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !147) // CHECK:STDOUT: !147 = !{!148} // CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !146, type: !22) // CHECK:STDOUT: !149 = !DILocation(line: 59, column: 28, scope: !146) diff --git a/toolchain/lower/testdata/for/for.carbon b/toolchain/lower/testdata/for/for.carbon index ea61a4c507a0..864101bfc3c2 100644 --- a/toolchain/lower/testdata/for/for.carbon +++ b/toolchain/lower/testdata/for/for.carbon @@ -243,14 +243,14 @@ fn For() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "for.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "for.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 21, column: 18, scope: !4) @@ -260,7 +260,7 @@ fn For() { // CHECK:STDOUT: !11 = !DILocation(line: 21, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 24, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 19, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !15, line: 24, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !15, line: 24, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !15 = !DIFile(filename: "{{.*}}/range.carbon", directory: "") // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} @@ -268,45 +268,45 @@ fn For() { // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !14, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 24, column: 39, scope: !14) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !22, type: !25) // CHECK:STDOUT: !28 = !DILocation(line: 21, column: 7, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !3, line: 21, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !1, line: 21, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !18) // CHECK:STDOUT: !32 = !DILocation(line: 21, column: 7, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !25) // CHECK:STDOUT: !36 = !DILocation(line: 21, column: 7, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.278d9a31079e7ff2:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.278d9a31079e7ff2:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !25) // CHECK:STDOUT: !40 = !DILocation(line: 21, column: 7, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab3effcb00e348a7:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ab3effcb00e348a7:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !25) // CHECK:STDOUT: !44 = !DILocation(line: 21, column: 7, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.db43fa38232c28dd:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.db43fa38232c28dd:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !25) // CHECK:STDOUT: !48 = !DILocation(line: 21, column: 18, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0d5da2659ce22e5f:core.Destroy.Core", scope: null, file: !3, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0d5da2659ce22e5f:core.Destroy.Core", scope: null, file: !1, line: 21, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !25) // CHECK:STDOUT: !52 = !DILocation(line: 21, column: 18, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !15, line: 25, type: !54, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !15, line: 25, type: !54, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !54 = !DISubroutineType(types: !55) // CHECK:STDOUT: !55 = !{!18, !25} // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !53, type: !25) // CHECK:STDOUT: !58 = !DILocation(line: 25, column: 43, scope: !53) // CHECK:STDOUT: !59 = !DILocation(line: 25, column: 36, scope: !53) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !15, line: 26, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !15, line: 26, type: !61, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !61 = !DISubroutineType(types: !62) // CHECK:STDOUT: !62 = !{!25, !25, !25} // CHECK:STDOUT: !63 = !{!64, !65} @@ -323,7 +323,7 @@ fn For() { // CHECK:STDOUT: !74 = !DILocation(line: 30, column: 9, scope: !60) // CHECK:STDOUT: !75 = !DILocation(line: 32, column: 16, scope: !60) // CHECK:STDOUT: !76 = !DILocation(line: 32, column: 9, scope: !60) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 36, type: !79, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !81) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 36, type: !79, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !81) // CHECK:STDOUT: !78 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !79 = !DISubroutineType(types: !80) // CHECK:STDOUT: !80 = !{!25, !25} @@ -331,40 +331,40 @@ fn For() { // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !77, type: !25) // CHECK:STDOUT: !83 = !DILocation(line: 37, column: 12, scope: !77) // CHECK:STDOUT: !84 = !DILocation(line: 37, column: 5, scope: !77) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 39, type: !54, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 39, type: !54, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !86 = !{!87} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !85, type: !25) // CHECK:STDOUT: !88 = !DILocation(line: 40, column: 12, scope: !85) // CHECK:STDOUT: !89 = !DILocation(line: 40, column: 5, scope: !85) -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !91, line: 396, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !91, line: 396, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !91 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !92 = !{!93} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !90, type: !18) // CHECK:STDOUT: !94 = !DILocation(line: 398, column: 5, scope: !90) // CHECK:STDOUT: !95 = !DILocation(line: 396, column: 3, scope: !90) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 33, type: !97, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !99) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 33, type: !97, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !99) // CHECK:STDOUT: !97 = !DISubroutineType(types: !98) // CHECK:STDOUT: !98 = !{!25, !18} // CHECK:STDOUT: !99 = !{!100} // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !96, type: !18) // CHECK:STDOUT: !101 = !DILocation(line: 34, column: 12, scope: !96) // CHECK:STDOUT: !102 = !DILocation(line: 34, column: 5, scope: !96) -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 30, type: !104, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.95ac245efc335d3f", scope: null, file: !78, line: 30, type: !104, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !104 = !DISubroutineType(types: !105) // CHECK:STDOUT: !105 = !{!25} // CHECK:STDOUT: !106 = !DILocation(line: 31, column: 12, scope: !103) // CHECK:STDOUT: !107 = !DILocation(line: 31, column: 5, scope: !103) -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 141, type: !79, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !109) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 141, type: !79, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !109) // CHECK:STDOUT: !109 = !{!110} // CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !108, type: !25) // CHECK:STDOUT: !111 = !DILocation(line: 142, column: 12, scope: !108) // CHECK:STDOUT: !112 = !DILocation(line: 142, column: 5, scope: !108) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 144, type: !54, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !114) +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 144, type: !54, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !114) // CHECK:STDOUT: !114 = !{!115} // CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !113, type: !25) // CHECK:STDOUT: !116 = !DILocation(line: 145, column: 12, scope: !113) // CHECK:STDOUT: !117 = !DILocation(line: 145, column: 5, scope: !113) -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.d395a13f81aa0e29.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !91, line: 331, type: !119, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !121) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.d395a13f81aa0e29.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !91, line: 331, type: !119, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !121) // CHECK:STDOUT: !119 = !DISubroutineType(types: !120) // CHECK:STDOUT: !120 = !{null, !18, !18} // CHECK:STDOUT: !121 = !{!122, !123} @@ -372,23 +372,23 @@ fn For() { // CHECK:STDOUT: !123 = !DILocalVariable(arg: 2, scope: !118, type: !18) // CHECK:STDOUT: !124 = !DILocation(line: 0, scope: !118) // CHECK:STDOUT: !125 = !DILocation(line: 331, column: 3, scope: !118) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 131, type: !97, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !127) +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 131, type: !97, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !127) // CHECK:STDOUT: !127 = !{!128} // CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !126, type: !18) // CHECK:STDOUT: !129 = !DILocation(line: 137, column: 5, scope: !126) // CHECK:STDOUT: !130 = !DILocation(line: 138, column: 5, scope: !126) // CHECK:STDOUT: !131 = !DILocation(line: 139, column: 5, scope: !126) -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 125, type: !104, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.39417379e302314a", scope: null, file: !78, line: 125, type: !104, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !133 = !DILocation(line: 128, column: 5, scope: !132) // CHECK:STDOUT: !134 = !DILocation(line: 129, column: 5, scope: !132) -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !91, line: 64, type: !136, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !138) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !91, line: 64, type: !136, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !138) // CHECK:STDOUT: !136 = !DISubroutineType(types: !137) // CHECK:STDOUT: !137 = !{!18, !18} // CHECK:STDOUT: !138 = !{!139} // CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !135, type: !18) // CHECK:STDOUT: !140 = !DILocation(line: 66, column: 17, scope: !135) // CHECK:STDOUT: !141 = !DILocation(line: 66, column: 5, scope: !135) -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !91, line: 59, type: !136, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !143) +// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !91, line: 59, type: !136, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !143) // CHECK:STDOUT: !143 = !{!144} // CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !142, type: !18) // CHECK:STDOUT: !145 = !DILocation(line: 59, column: 28, scope: !142) diff --git a/toolchain/lower/testdata/function/call/empty_struct.carbon b/toolchain/lower/testdata/function/call/empty_struct.carbon index 2f6dbf028198..b81024cb8e04 100644 --- a/toolchain/lower/testdata/function/call/empty_struct.carbon +++ b/toolchain/lower/testdata/function/call/empty_struct.carbon @@ -42,18 +42,18 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty_struct.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty_struct.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 18, column: 15, scope: !8) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 1, scope: !8) diff --git a/toolchain/lower/testdata/function/call/empty_tuple.carbon b/toolchain/lower/testdata/function/call/empty_tuple.carbon index 28bc4431a411..225390b61cb4 100644 --- a/toolchain/lower/testdata/function/call/empty_tuple.carbon +++ b/toolchain/lower/testdata/function/call/empty_tuple.carbon @@ -42,18 +42,18 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty_tuple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty_tuple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 18, column: 15, scope: !8) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 1, scope: !8) diff --git a/toolchain/lower/testdata/function/call/form.carbon b/toolchain/lower/testdata/function/call/form.carbon index 317f212a04ae..5094d792c61c 100644 --- a/toolchain/lower/testdata/function/call/form.carbon +++ b/toolchain/lower/testdata/function/call/form.carbon @@ -93,20 +93,20 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "ref_form_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "ref_form_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -141,20 +141,20 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_form_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_form_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 3, column: 6, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -175,14 +175,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "val_form_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "val_form_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 3, scope: !4) @@ -201,14 +201,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "ref_return_form.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "ref_return_form.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 27, scope: !4) @@ -241,20 +241,20 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_return_form.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_return_form.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 14, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 27, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -275,14 +275,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "val_return_form.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "val_return_form.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 23, scope: !4) diff --git a/toolchain/lower/testdata/function/call/i32.carbon b/toolchain/lower/testdata/function/call/i32.carbon index 6e1c901ee338..d91ddcee069b 100644 --- a/toolchain/lower/testdata/function/call/i32.carbon +++ b/toolchain/lower/testdata/function/call/i32.carbon @@ -50,27 +50,27 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "i32.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "i32.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 18, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 18, column: 16, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 1, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !7} // CHECK:STDOUT: !20 = !{!21} diff --git a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon index 594a2e1f912d..444e8ec8e68e 100644 --- a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon +++ b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon @@ -55,20 +55,20 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "implicit_empty_tuple_as_arg.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "implicit_empty_tuple_as_arg.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 23, scope: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 19, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 19, column: 19, scope: !10) // CHECK:STDOUT: !13 = !DILocation(line: 19, column: 15, scope: !10) diff --git a/toolchain/lower/testdata/function/call/params_one.carbon b/toolchain/lower/testdata/function/call/params_one.carbon index 07cf04587043..07e9771d2b99 100644 --- a/toolchain/lower/testdata/function/call/params_one.carbon +++ b/toolchain/lower/testdata/function/call/params_one.carbon @@ -34,21 +34,21 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_one.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_one.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/function/call/params_one_comma.carbon b/toolchain/lower/testdata/function/call/params_one_comma.carbon index 2af913aaad9e..3bee2e4b067a 100644 --- a/toolchain/lower/testdata/function/call/params_one_comma.carbon +++ b/toolchain/lower/testdata/function/call/params_one_comma.carbon @@ -36,21 +36,21 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_one_comma.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_one_comma.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/function/call/params_two.carbon b/toolchain/lower/testdata/function/call/params_two.carbon index 79ddb9055c70..4dacc12ad05f 100644 --- a/toolchain/lower/testdata/function/call/params_two.carbon +++ b/toolchain/lower/testdata/function/call/params_two.carbon @@ -34,14 +34,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_two.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_two.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -49,7 +49,7 @@ fn Main() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 3, scope: !12) diff --git a/toolchain/lower/testdata/function/call/params_two_comma.carbon b/toolchain/lower/testdata/function/call/params_two_comma.carbon index 2fe1b431dc12..2e472a2220ce 100644 --- a/toolchain/lower/testdata/function/call/params_two_comma.carbon +++ b/toolchain/lower/testdata/function/call/params_two_comma.carbon @@ -36,14 +36,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_two_comma.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_two_comma.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -51,7 +51,7 @@ fn Main() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 3, scope: !12) diff --git a/toolchain/lower/testdata/function/call/params_zero.carbon b/toolchain/lower/testdata/function/call/params_zero.carbon index 1067b6391c84..9f92db4b6223 100644 --- a/toolchain/lower/testdata/function/call/params_zero.carbon +++ b/toolchain/lower/testdata/function/call/params_zero.carbon @@ -34,17 +34,17 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_zero.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_zero.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 1, scope: !8) diff --git a/toolchain/lower/testdata/function/call/ref_param.carbon b/toolchain/lower/testdata/function/call/ref_param.carbon index 9b829af0f22e..f212b40cd048 100644 --- a/toolchain/lower/testdata/function/call/ref_param.carbon +++ b/toolchain/lower/testdata/function/call/ref_param.carbon @@ -49,27 +49,27 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "ref_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoNothing", linkageName: "_CDoNothing.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "ref_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoNothing", linkageName: "_CDoNothing.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 17, column: 3, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 15, column: 1, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 16, column: 3, scope: !17) diff --git a/toolchain/lower/testdata/function/call/ref_return.carbon b/toolchain/lower/testdata/function/call/ref_return.carbon index 1e7cdbb939cf..674ccc9ef06d 100644 --- a/toolchain/lower/testdata/function/call/ref_return.carbon +++ b/toolchain/lower/testdata/function/call/ref_return.carbon @@ -52,14 +52,14 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "ref_return.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "ref_return.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -67,13 +67,13 @@ fn Main() { // CHECK:STDOUT: !9 = !{!10} // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 18, column: 3, scope: !12) // CHECK:STDOUT: !16 = !DILocation(line: 19, column: 3, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 17, column: 1, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !8} // CHECK:STDOUT: !21 = !{!22} diff --git a/toolchain/lower/testdata/function/call/return_implicit.carbon b/toolchain/lower/testdata/function/call/return_implicit.carbon index e811c169b657..24f3e4564b20 100644 --- a/toolchain/lower/testdata/function/call/return_implicit.carbon +++ b/toolchain/lower/testdata/function/call/return_implicit.carbon @@ -42,18 +42,18 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "return_implicit.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "MakeImplicitEmptyTuple", linkageName: "_CMakeImplicitEmptyTuple.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_implicit.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "MakeImplicitEmptyTuple", linkageName: "_CMakeImplicitEmptyTuple.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 18, column: 15, scope: !8) // CHECK:STDOUT: !11 = !DILocation(line: 17, column: 1, scope: !8) diff --git a/toolchain/lower/testdata/function/call/struct_param.carbon b/toolchain/lower/testdata/function/call/struct_param.carbon index 62219f74c4df..2f441c6c34b0 100644 --- a/toolchain/lower/testdata/function/call/struct_param.carbon +++ b/toolchain/lower/testdata/function/call/struct_param.carbon @@ -36,14 +36,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "struct_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "struct_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -51,7 +51,7 @@ fn Main() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 3, scope: !12) diff --git a/toolchain/lower/testdata/function/call/tuple_param.carbon b/toolchain/lower/testdata/function/call/tuple_param.carbon index 2dcbe849b686..0ee9112190a3 100644 --- a/toolchain/lower/testdata/function/call/tuple_param.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param.carbon @@ -36,14 +36,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "tuple_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "tuple_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -51,7 +51,7 @@ fn Main() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 3, scope: !12) diff --git a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon index 82b9f443a488..6823cf57129e 100644 --- a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon @@ -68,14 +68,14 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "tuple_param_with_return_slot.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "tuple_param_with_return_slot.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -87,19 +87,19 @@ fn Main() { // CHECK:STDOUT: !13 = !DILocation(line: 14, column: 21, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 14, column: 10, scope: !4) // CHECK:STDOUT: !15 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null} // CHECK:STDOUT: !19 = !DILocation(line: 18, column: 3, scope: !16) // CHECK:STDOUT: !20 = !DILocation(line: 17, column: 1, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !21, type: !24) // CHECK:STDOUT: !27 = !DILocation(line: 18, column: 3, scope: !21) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{null, !7} // CHECK:STDOUT: !31 = !{!32} diff --git a/toolchain/lower/testdata/function/call/var_param.carbon b/toolchain/lower/testdata/function/call/var_param.carbon index 8a99b8972af2..473d5f67d131 100644 --- a/toolchain/lower/testdata/function/call/var_param.carbon +++ b/toolchain/lower/testdata/function/call/var_param.carbon @@ -50,28 +50,28 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoNothing", linkageName: "_CDoNothing.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoNothing", linkageName: "_CDoNothing.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 17, column: 13, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 3, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !21 = !DILocation(line: 16, column: 3, scope: !18) diff --git a/toolchain/lower/testdata/function/declaration/simple.carbon b/toolchain/lower/testdata/function/declaration/simple.carbon index 5a5af4792069..0896c18e849a 100644 --- a/toolchain/lower/testdata/function/declaration/simple.carbon +++ b/toolchain/lower/testdata/function/declaration/simple.carbon @@ -36,14 +36,14 @@ fn I() -> A; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/function/definition/destroy.carbon b/toolchain/lower/testdata/function/definition/destroy.carbon index fa75f88e7caf..61b5eac9e1f9 100644 --- a/toolchain/lower/testdata/function/definition/destroy.carbon +++ b/toolchain/lower/testdata/function/definition/destroy.carbon @@ -109,28 +109,28 @@ fn InitLet() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "let_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "let_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 6, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !3, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 12, column: 5, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 15, column: 3, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 11, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !21 = !DILocation(line: 12, column: 5, scope: !18) @@ -174,28 +174,28 @@ fn InitLet() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 6, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !3, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 6, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 15, column: 3, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 11, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !21 = !DILocation(line: 6, column: 6, scope: !18) @@ -260,35 +260,35 @@ fn InitLet() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "return_slot.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_slot.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 10, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 3, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 17, column: 3, scope: !12) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 14, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 18, column: 3, scope: !12) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 1, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 17, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !7} // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !24 = !DILocation(line: 17, column: 3, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !3, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !1, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DILocation(line: 22, column: 14, scope: !25) // CHECK:STDOUT: !27 = !DILocation(line: 23, column: 3, scope: !25) // CHECK:STDOUT: !28 = !DILocation(line: 21, column: 1, scope: !25) diff --git a/toolchain/lower/testdata/function/definition/empty_struct.carbon b/toolchain/lower/testdata/function/definition/empty_struct.carbon index 93e735d15bfb..804203a944f6 100644 --- a/toolchain/lower/testdata/function/definition/empty_struct.carbon +++ b/toolchain/lower/testdata/function/definition/empty_struct.carbon @@ -24,14 +24,14 @@ fn Echo(_: {}) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty_struct.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty_struct.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/function/definition/eval_musteval.carbon b/toolchain/lower/testdata/function/definition/eval_musteval.carbon index 47d0ccae9afa..8cfc0f7c5340 100644 --- a/toolchain/lower/testdata/function/definition/eval_musteval.carbon +++ b/toolchain/lower/testdata/function/definition/eval_musteval.carbon @@ -67,25 +67,25 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "eval.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Eval", linkageName: "_CEval.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "eval.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Eval", linkageName: "_CEval.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7} // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 3, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !15, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 10, scope: !15) @@ -101,14 +101,14 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "musteval.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "musteval.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/function/definition/params_one.carbon b/toolchain/lower/testdata/function/definition/params_one.carbon index c85fdb79955e..acc4b238670b 100644 --- a/toolchain/lower/testdata/function/definition/params_one.carbon +++ b/toolchain/lower/testdata/function/definition/params_one.carbon @@ -23,14 +23,14 @@ fn Foo(_: i32) {} // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_one.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_one.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/function/definition/params_two.carbon b/toolchain/lower/testdata/function/definition/params_two.carbon index ce2c6123a95d..630e7323d306 100644 --- a/toolchain/lower/testdata/function/definition/params_two.carbon +++ b/toolchain/lower/testdata/function/definition/params_two.carbon @@ -23,14 +23,14 @@ fn Foo(_: i32, _: i32) {} // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_two.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_two.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/function/definition/params_zero.carbon b/toolchain/lower/testdata/function/definition/params_zero.carbon index 9f2fb0ccb914..56a7172dbe92 100644 --- a/toolchain/lower/testdata/function/definition/params_zero.carbon +++ b/toolchain/lower/testdata/function/definition/params_zero.carbon @@ -23,14 +23,14 @@ fn Foo() {} // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "params_zero.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "params_zero.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/function/definition/raw_name.carbon b/toolchain/lower/testdata/function/definition/raw_name.carbon index 7c309a1a2a4e..2b0aafdc8fee 100644 --- a/toolchain/lower/testdata/function/definition/raw_name.carbon +++ b/toolchain/lower/testdata/function/definition/raw_name.carbon @@ -24,14 +24,14 @@ fn r#self() {} // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "raw_name.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "self", linkageName: "_Cself.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "raw_name.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "self", linkageName: "_Cself.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/function/definition/var_param.carbon b/toolchain/lower/testdata/function/definition/var_param.carbon index 0884f64ee35c..32f877a125ab 100644 --- a/toolchain/lower/testdata/function/definition/var_param.carbon +++ b/toolchain/lower/testdata/function/definition/var_param.carbon @@ -129,45 +129,45 @@ fn Call() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_param.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "OneVar_i32", linkageName: "_COneVar_i32.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "OneVar_i32", linkageName: "_COneVar_i32.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "OneVar_X", linkageName: "_COneVar_X.Main", scope: null, file: !3, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "OneVar_X", linkageName: "_COneVar_X.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 16, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TwoVars", linkageName: "_CTwoVars.Main", scope: null, file: !3, line: 18, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TwoVars", linkageName: "_CTwoVars.Main", scope: null, file: !1, line: 18, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !7, !14} // CHECK:STDOUT: !21 = !{!22, !23} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !23 = !DILocalVariable(arg: 2, scope: !18, type: !14) // CHECK:STDOUT: !24 = !DILocation(line: 18, column: 1, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "VarThenLet", linkageName: "_CVarThenLet.Main", scope: null, file: !3, line: 20, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "VarThenLet", linkageName: "_CVarThenLet.Main", scope: null, file: !1, line: 20, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27, !28} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocalVariable(arg: 2, scope: !25, type: !14) // CHECK:STDOUT: !29 = !DILocation(line: 20, column: 1, scope: !25) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "LetThenVar", linkageName: "_CLetThenVar.Main", scope: null, file: !3, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "LetThenVar", linkageName: "_CLetThenVar.Main", scope: null, file: !1, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32, !33} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !7) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !30, type: !14) // CHECK:STDOUT: !34 = !DILocation(line: 21, column: 1, scope: !30) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 23, type: !36, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 23, type: !36, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !36 = !DISubroutineType(types: !37) // CHECK:STDOUT: !37 = !{null} // CHECK:STDOUT: !38 = !DILocation(line: 15, column: 15, scope: !35) @@ -183,11 +183,11 @@ fn Call() { // CHECK:STDOUT: !48 = !DILocation(line: 27, column: 3, scope: !35) // CHECK:STDOUT: !49 = !DILocation(line: 28, column: 3, scope: !35) // CHECK:STDOUT: !50 = !DILocation(line: 23, column: 1, scope: !35) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !3, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !52) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !1, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52) // CHECK:STDOUT: !52 = !{!53} // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !14) // CHECK:STDOUT: !54 = !DILocation(line: 21, column: 23, scope: !51) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7) // CHECK:STDOUT: !58 = !DILocation(line: 20, column: 15, scope: !55) diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 198907d1ae70..841cc4f3a264 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -128,14 +128,14 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 3, scope: !4) @@ -150,41 +150,41 @@ fn G() { // CHECK:STDOUT: !16 = !DILocation(line: 28, column: 3, scope: !4) // CHECK:STDOUT: !17 = !DILocation(line: 29, column: 3, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 1, scope: !4) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 23, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 23, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 23, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !29} // CHECK:STDOUT: !29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !26, type: !29) // CHECK:STDOUT: !32 = !DILocation(line: 22, column: 3, scope: !26) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7fd3b6c3a3c15807:core.Destroy.Core", scope: null, file: !3, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7fd3b6c3a3c15807:core.Destroy.Core", scope: null, file: !1, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !22) // CHECK:STDOUT: !36 = !DILocation(line: 21, column: 3, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !22) // CHECK:STDOUT: !40 = !DILocation(line: 20, column: 3, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !3, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !1, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !22) // CHECK:STDOUT: !44 = !DILocation(line: 13, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !3, line: 13, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !1, line: 13, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !29) // CHECK:STDOUT: !48 = !DILocation(line: 13, column: 1, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !3, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !1, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !22) // CHECK:STDOUT: !52 = !DILocation(line: 13, column: 1, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5754c7a55c7cbe4a", scope: null, file: !3, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5754c7a55c7cbe4a", scope: null, file: !1, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !22) // CHECK:STDOUT: !56 = !DILocation(line: 13, column: 1, scope: !53) diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index f0857ad387fa..bfc45d64b45f 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -271,31 +271,31 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_basic.carbon", directory: "") -// 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: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 34, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 43, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 43, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 43, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 34, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 34, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 34, column: 3, scope: !17) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 48, type: !22, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 48, type: !22, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DILocation(line: 49, column: 3, scope: !21) @@ -309,18 +309,18 @@ fn M() { // CHECK:STDOUT: !32 = !DILocation(line: 55, column: 18, scope: !21) // CHECK:STDOUT: !33 = !DILocation(line: 55, column: 16, scope: !21) // CHECK:STDOUT: !34 = !DILocation(line: 48, column: 1, scope: !21) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 53, type: !36, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 53, type: !36, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !36 = !DISubroutineType(types: !37) // CHECK:STDOUT: !37 = !{null, !38} // CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !35, type: !38) // CHECK:STDOUT: !41 = !DILocation(line: 53, column: 16, scope: !35) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !3, line: 19, type: !36, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !1, line: 19, type: !36, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !43 = !{!44} // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !42, type: !38) // CHECK:STDOUT: !45 = !DILocation(line: 19, column: 1, scope: !42) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.58016a73bff04416", scope: null, file: !3, line: 28, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.58016a73bff04416", scope: null, file: !1, line: 28, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!38, !38} // CHECK:STDOUT: !49 = !{!50} @@ -344,11 +344,11 @@ fn M() { // CHECK:STDOUT: !67 = !DILocation(line: 41, column: 5, scope: !46) // CHECK:STDOUT: !68 = !DILocation(line: 41, column: 3, scope: !46) // CHECK:STDOUT: !69 = !DILocation(line: 45, column: 3, scope: !46) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !3, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !71) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !1, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !71) // CHECK:STDOUT: !71 = !{!72} // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !70, type: !7) // CHECK:STDOUT: !73 = !DILocation(line: 19, column: 1, scope: !70) -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.fa1f0912a5bbe922", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !75) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.fa1f0912a5bbe922", scope: null, file: !1, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !75) // CHECK:STDOUT: !75 = !{!76} // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !74, type: !7) // CHECK:STDOUT: !77 = !DILocation(line: 29, column: 3, scope: !74) @@ -370,23 +370,23 @@ fn M() { // CHECK:STDOUT: !93 = !DILocation(line: 41, column: 5, scope: !74) // CHECK:STDOUT: !94 = !DILocation(line: 41, column: 3, scope: !74) // CHECK:STDOUT: !95 = !DILocation(line: 45, column: 3, scope: !74) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.5bd8d5767580997a", scope: null, file: !3, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !97) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.5bd8d5767580997a", scope: null, file: !1, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !97) // CHECK:STDOUT: !97 = !{!98} // CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !96, type: !38) // CHECK:STDOUT: !99 = !DILocation(line: 23, column: 3, scope: !96) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !101) +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !101) // CHECK:STDOUT: !101 = !{!102} // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !100, type: !7) // CHECK:STDOUT: !103 = !DILocation(line: 23, column: 3, scope: !100) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c27b765f2159c9a0", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !105) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c27b765f2159c9a0", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !105) // CHECK:STDOUT: !105 = !{!106} // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !104, type: !7) // CHECK:STDOUT: !107 = !DILocation(line: 23, column: 3, scope: !104) -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2621742a01881e29", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !109) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2621742a01881e29", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !109) // CHECK:STDOUT: !109 = !{!110} // CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !108, type: !7) // CHECK:STDOUT: !111 = !DILocation(line: 23, column: 3, scope: !108) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d597ec621e4ba00", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !113) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d597ec621e4ba00", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !113 = !{!114} // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !112, type: !7) // CHECK:STDOUT: !115 = !DILocation(line: 23, column: 10, scope: !112) diff --git a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon index 3d51a8f58c27..86301d7a33a6 100644 --- a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon @@ -100,14 +100,14 @@ fn M() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_basic_depth.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_basic_depth.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 30, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -120,17 +120,17 @@ fn M() -> i32 { // CHECK:STDOUT: !14 = !DILocation(line: 35, column: 3, scope: !4) // CHECK:STDOUT: !15 = !DILocation(line: 36, column: 10, scope: !4) // CHECK:STDOUT: !16 = !DILocation(line: 36, column: 3, scope: !4) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 35, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 35, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !7} // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 35, column: 7, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !3, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !1, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !23, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 16, column: 1, scope: !23) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.58016a73bff04416", scope: null, file: !3, line: 24, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.58016a73bff04416", scope: null, file: !1, line: 24, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{!7, !7} // CHECK:STDOUT: !30 = !{!31} @@ -138,7 +138,7 @@ fn M() -> i32 { // CHECK:STDOUT: !32 = !DILocation(line: 25, column: 3, scope: !27) // CHECK:STDOUT: !33 = !DILocation(line: 26, column: 3, scope: !27) // CHECK:STDOUT: !34 = !DILocation(line: 27, column: 3, scope: !27) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.5bd8d5767580997a", scope: null, file: !3, line: 19, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.5bd8d5767580997a", scope: null, file: !1, line: 19, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 20, column: 3, scope: !35) diff --git a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon index 9fa09b74c70d..2d1a0afecca2 100644 --- a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon @@ -63,14 +63,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_dedup_ptr.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_dedup_ptr.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 18, column: 3, scope: !4) @@ -83,7 +83,7 @@ fn M() { // CHECK:STDOUT: !14 = !DILocation(line: 23, column: 5, scope: !4) // CHECK:STDOUT: !15 = !DILocation(line: 23, column: 3, scope: !4) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 1, scope: !4) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !3, line: 13, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !1, line: 13, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{!20, !20} // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon index fc29ba573e91..12676d30d8b0 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -141,14 +141,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_deref_ptr.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_deref_ptr.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 36, column: 3, scope: !4) @@ -158,57 +158,57 @@ fn M() { // CHECK:STDOUT: !11 = !DILocation(line: 40, column: 5, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 40, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 35, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 39, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 39, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 39, column: 3, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 40, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 40, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !21, type: !24) // CHECK:STDOUT: !27 = !DILocation(line: 40, column: 3, scope: !21) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.58016a73bff04416", scope: null, file: !3, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.58016a73bff04416", scope: null, file: !1, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !24) // CHECK:STDOUT: !31 = !DILocation(line: 31, column: 3, scope: !28) // CHECK:STDOUT: !32 = !DILocation(line: 32, column: 3, scope: !28) // CHECK:STDOUT: !33 = !DILocation(line: 30, column: 1, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fa1f0912a5bbe922", scope: null, file: !3, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fa1f0912a5bbe922", scope: null, file: !1, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !24) // CHECK:STDOUT: !37 = !DILocation(line: 31, column: 3, scope: !34) // CHECK:STDOUT: !38 = !DILocation(line: 32, column: 3, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 30, column: 1, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !41 = !DISubroutineType(types: !42) // CHECK:STDOUT: !42 = !{!24, !24} // CHECK:STDOUT: !43 = !{!44} // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !40, type: !24) // CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !40) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.58016a73bff04416", scope: null, file: !3, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !47) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.58016a73bff04416", scope: null, file: !1, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !47) // CHECK:STDOUT: !47 = !{!48} // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !46, type: !24) // CHECK:STDOUT: !49 = !DILocation(line: 27, column: 3, scope: !46) // CHECK:STDOUT: !50 = !DILocation(line: 27, column: 5, scope: !46) // CHECK:STDOUT: !51 = !DILocation(line: 26, column: 1, scope: !46) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.fa1f0912a5bbe922", scope: null, file: !3, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.fa1f0912a5bbe922", scope: null, file: !1, line: 26, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !24) // CHECK:STDOUT: !55 = !DILocation(line: 27, column: 3, scope: !52) // CHECK:STDOUT: !56 = !DILocation(line: 27, column: 5, scope: !52) // CHECK:STDOUT: !57 = !DILocation(line: 26, column: 1, scope: !52) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !3, line: 22, type: !59, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !1, line: 22, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !59 = !DISubroutineType(types: !60) // CHECK:STDOUT: !60 = !{!17, !17} // CHECK:STDOUT: !61 = !{!62} // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !58, type: !17) // CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !58) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !3, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !65) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !1, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !65) // CHECK:STDOUT: !65 = !{!66} // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !64, type: !24) // CHECK:STDOUT: !67 = !DILocation(line: 23, column: 3, scope: !64) diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index 8f00881bc908..013b290e398d 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -75,22 +75,22 @@ fn H() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_different_associated_const.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_different_associated_const.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 36, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 37, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 35, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.b78152d23f5a56c7", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.b78152d23f5a56c7", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 23, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 1, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.1ba7ae4c6ee83247", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.1ba7ae4c6ee83247", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DILocation(line: 23, column: 3, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 22, column: 1, scope: !13) diff --git a/toolchain/lower/testdata/function/generic/call_different_impls.carbon b/toolchain/lower/testdata/function/generic/call_different_impls.carbon index dfa58aa55234..df24064a3998 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls.carbon @@ -81,31 +81,31 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_different_impls.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_different_impls.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 12, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 20, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !1, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 24, column: 12, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 24, column: 3, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 31, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 31, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !DILocation(line: 32, column: 3, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 33, column: 3, scope: !12) // CHECK:STDOUT: !18 = !DILocation(line: 31, column: 1, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c81631f865470482", scope: null, file: !3, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c81631f865470482", scope: null, file: !1, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 29, column: 15, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 29, column: 1, scope: !19) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0b241ec84a68877b", scope: null, file: !3, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0b241ec84a68877b", scope: null, file: !1, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DILocation(line: 29, column: 15, scope: !22) // CHECK:STDOUT: !24 = !DILocation(line: 29, column: 1, scope: !22) diff --git a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon index 0f99c76951fb..4b8b6451edd8 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon @@ -112,40 +112,40 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_different_impls_with_const.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_different_impls_with_const.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 22, column: 5, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 23, column: 5, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 27, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 27, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !10, type: !13) // CHECK:STDOUT: !16 = !DILocation(line: 27, column: 24, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !3, line: 28, type: !18, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !1, line: 28, type: !18, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{!13} // CHECK:STDOUT: !20 = !DILocation(line: 29, column: 5, scope: !17) // CHECK:STDOUT: !21 = !DILocation(line: 30, column: 5, scope: !17) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 40, type: !18, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 40, type: !18, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DILocation(line: 41, column: 3, scope: !22) // CHECK:STDOUT: !24 = !DILocation(line: 42, column: 3, scope: !22) // CHECK:STDOUT: !25 = !DILocation(line: 40, column: 1, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.7329ec068e7cb0e6", scope: null, file: !3, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.7329ec068e7cb0e6", scope: null, file: !1, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null} // CHECK:STDOUT: !29 = !DILocation(line: 37, column: 16, scope: !26) // CHECK:STDOUT: !30 = !DILocation(line: 36, column: 1, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.89fa38d00ffc0e46", scope: null, file: !3, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.89fa38d00ffc0e46", scope: null, file: !1, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !32 = !DILocation(line: 37, column: 16, scope: !31) // CHECK:STDOUT: !33 = !DILocation(line: 36, column: 1, scope: !31) diff --git a/toolchain/lower/testdata/function/generic/call_different_specific.carbon b/toolchain/lower/testdata/function/generic/call_different_specific.carbon index bec304385c26..02506f2b1d8f 100644 --- a/toolchain/lower/testdata/function/generic/call_different_specific.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_specific.carbon @@ -137,14 +137,14 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_different_specific.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 42, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_different_specific.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 42, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -154,56 +154,56 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: !11 = !DILocation(line: 43, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 44, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 42, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 43, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 43, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 43, column: 3, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 44, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 44, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !7} // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !21, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 44, column: 3, scope: !21) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.58016a73bff04416", scope: null, file: !3, line: 37, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.58016a73bff04416", scope: null, file: !1, line: 37, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 38, column: 3, scope: !27) // CHECK:STDOUT: !31 = !DILocation(line: 39, column: 3, scope: !27) // CHECK:STDOUT: !32 = !DILocation(line: 37, column: 1, scope: !27) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fa1f0912a5bbe922", scope: null, file: !3, line: 37, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fa1f0912a5bbe922", scope: null, file: !1, line: 37, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 38, column: 3, scope: !33) // CHECK:STDOUT: !37 = !DILocation(line: 39, column: 3, scope: !33) // CHECK:STDOUT: !38 = !DILocation(line: 37, column: 1, scope: !33) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 25, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 25, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{!7, !7} // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !39, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 26, column: 3, scope: !39) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.58016a73bff04416", scope: null, file: !3, line: 33, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.58016a73bff04416", scope: null, file: !1, line: 33, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !7) // CHECK:STDOUT: !48 = !DILocation(line: 34, column: 3, scope: !45) // CHECK:STDOUT: !49 = !DILocation(line: 34, column: 5, scope: !45) // CHECK:STDOUT: !50 = !DILocation(line: 33, column: 1, scope: !45) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.fa1f0912a5bbe922", scope: null, file: !3, line: 33, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !52) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.fa1f0912a5bbe922", scope: null, file: !1, line: 33, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52) // CHECK:STDOUT: !52 = !{!53} // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !7) // CHECK:STDOUT: !54 = !DILocation(line: 34, column: 3, scope: !51) // CHECK:STDOUT: !55 = !DILocation(line: 34, column: 5, scope: !51) // CHECK:STDOUT: !56 = !DILocation(line: 33, column: 1, scope: !51) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !3, line: 29, type: !58, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !1, line: 29, type: !58, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !60) // CHECK:STDOUT: !58 = !DISubroutineType(types: !59) // CHECK:STDOUT: !59 = !{!17, !17} // CHECK:STDOUT: !60 = !{!61} // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !57, type: !17) // CHECK:STDOUT: !62 = !DILocation(line: 30, column: 3, scope: !57) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !3, line: 29, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !64) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !1, line: 29, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !64) // CHECK:STDOUT: !64 = !{!65} // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !63, type: !7) // CHECK:STDOUT: !66 = !DILocation(line: 30, column: 3, scope: !63) diff --git a/toolchain/lower/testdata/function/generic/call_impl_function.carbon b/toolchain/lower/testdata/function/generic/call_impl_function.carbon index d3f226582697..ac8ef1952a0e 100644 --- a/toolchain/lower/testdata/function/generic/call_impl_function.carbon +++ b/toolchain/lower/testdata/function/generic/call_impl_function.carbon @@ -69,14 +69,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_impl_function.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.ImplsSomeInterface.Main:SomeInterface.84588f41d61dafba.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_impl_function.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.ImplsSomeInterface.Main:SomeInterface.84588f41d61dafba.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -84,12 +84,12 @@ fn G() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 23, column: 12, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 23, column: 5, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 40, column: 3, scope: !12) // CHECK:STDOUT: !16 = !DILocation(line: 39, column: 1, scope: !12) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "CallGenericMethod", linkageName: "_CCallGenericMethod.Main.a8a4675a2f98891e", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "CallGenericMethod", linkageName: "_CCallGenericMethod.Main.a8a4675a2f98891e", scope: null, file: !1, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 36, column: 10, scope: !17) diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index 2ae21b958b2c..ba8ce0c459b9 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -73,14 +73,14 @@ fn CallF() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_method.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_method.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -89,20 +89,20 @@ fn CallF() -> i32 { // CHECK:STDOUT: !10 = !DILocation(line: 22, column: 14, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 22, column: 10, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 21, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 21, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 21, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 20, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.5bd8d5767580997a", scope: null, file: !3, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.5bd8d5767580997a", scope: null, file: !1, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{!7, !22, !7} // CHECK:STDOUT: !29 = !{!30, !31} diff --git a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon index 0d3a443ff0a3..fc546448e7c9 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon @@ -182,21 +182,21 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_basic.carbon", directory: "") -// 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: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 34, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 28, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 28, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 29, column: 3, scope: !11) @@ -214,24 +214,24 @@ fn M() { // CHECK:STDOUT: !26 = !DILocation(line: 37, column: 5, scope: !11) // CHECK:STDOUT: !27 = !DILocation(line: 37, column: 3, scope: !11) // CHECK:STDOUT: !28 = !DILocation(line: 28, column: 1, scope: !11) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 40, type: !30, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 40, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{null, !7} // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !29, type: !7) // CHECK:STDOUT: !34 = !DILocation(line: 40, column: 3, scope: !29) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 30, type: !30, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 30, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 30, column: 3, scope: !35) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 29, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 29, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !43) // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{null, !42} // CHECK:STDOUT: !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !43 = !{!44} // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !39, type: !42) // CHECK:STDOUT: !45 = !DILocation(line: 29, column: 3, scope: !39) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !3, line: 21, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 21, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!42, !42, !42} // CHECK:STDOUT: !49 = !{!50, !51} @@ -243,7 +243,7 @@ fn M() { // CHECK:STDOUT: !55 = !DILocation(line: 25, column: 15, scope: !46) // CHECK:STDOUT: !56 = !DILocation(line: 25, column: 10, scope: !46) // CHECK:STDOUT: !57 = !DILocation(line: 25, column: 3, scope: !46) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !3, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !1, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !59 = !DISubroutineType(types: !60) // CHECK:STDOUT: !60 = !{!7, !7, !42} // CHECK:STDOUT: !61 = !{!62, !63} @@ -255,7 +255,7 @@ fn M() { // CHECK:STDOUT: !67 = !DILocation(line: 25, column: 15, scope: !58) // CHECK:STDOUT: !68 = !DILocation(line: 25, column: 10, scope: !58) // CHECK:STDOUT: !69 = !DILocation(line: 25, column: 3, scope: !58) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !3, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !71) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !1, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !71) // CHECK:STDOUT: !71 = !{!72, !73} // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !70, type: !7) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 2, scope: !70, type: !42) @@ -265,7 +265,7 @@ fn M() { // CHECK:STDOUT: !77 = !DILocation(line: 25, column: 15, scope: !70) // CHECK:STDOUT: !78 = !DILocation(line: 25, column: 10, scope: !70) // CHECK:STDOUT: !79 = !DILocation(line: 25, column: 3, scope: !70) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d597ec621e4ba00", scope: null, file: !3, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !81) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d597ec621e4ba00", scope: null, file: !1, line: 21, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !81) // CHECK:STDOUT: !81 = !{!82, !83} // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !80, type: !7) // CHECK:STDOUT: !83 = !DILocalVariable(arg: 2, scope: !80, type: !42) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon index 332cd8b8d6e8..bbeee590b971 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon @@ -258,14 +258,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_diamond.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 47, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_diamond.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 47, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 48, column: 3, scope: !4) @@ -281,21 +281,21 @@ fn M() { // CHECK:STDOUT: !17 = !DILocation(line: 56, column: 5, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 56, column: 3, scope: !4) // CHECK:STDOUT: !19 = !DILocation(line: 47, column: 1, scope: !4) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 49, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 49, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 49, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 48, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 48, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !27, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 48, column: 3, scope: !27) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.5bd8d5767580997a", scope: null, file: !3, line: 21, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.5bd8d5767580997a", scope: null, file: !1, line: 21, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!30, !30, !30} // CHECK:STDOUT: !37 = !{!38, !39} @@ -310,7 +310,7 @@ fn M() { // CHECK:STDOUT: !46 = !DILocation(line: 26, column: 5, scope: !34) // CHECK:STDOUT: !47 = !DILocation(line: 28, column: 12, scope: !34) // CHECK:STDOUT: !48 = !DILocation(line: 28, column: 5, scope: !34) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c27b765f2159c9a0", scope: null, file: !3, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c27b765f2159c9a0", scope: null, file: !1, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52) // CHECK:STDOUT: !50 = !DISubroutineType(types: !51) // CHECK:STDOUT: !51 = !{!23, !23, !30} // CHECK:STDOUT: !52 = !{!53, !54} @@ -325,7 +325,7 @@ fn M() { // CHECK:STDOUT: !61 = !DILocation(line: 26, column: 5, scope: !49) // CHECK:STDOUT: !62 = !DILocation(line: 28, column: 12, scope: !49) // CHECK:STDOUT: !63 = !DILocation(line: 28, column: 5, scope: !49) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2621742a01881e29", scope: null, file: !3, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !65) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2621742a01881e29", scope: null, file: !1, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !65) // CHECK:STDOUT: !65 = !{!66, !67} // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !64, type: !23) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 2, scope: !64, type: !30) @@ -338,63 +338,63 @@ fn M() { // CHECK:STDOUT: !74 = !DILocation(line: 26, column: 5, scope: !64) // CHECK:STDOUT: !75 = !DILocation(line: 28, column: 12, scope: !64) // CHECK:STDOUT: !76 = !DILocation(line: 28, column: 5, scope: !64) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.5bd8d5767580997a", scope: null, file: !3, line: 33, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !78) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.5bd8d5767580997a", scope: null, file: !1, line: 33, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !78) // CHECK:STDOUT: !78 = !{!79, !80} // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !77, type: !30) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !77, type: !30) // CHECK:STDOUT: !81 = !DILocation(line: 34, column: 3, scope: !77) // CHECK:STDOUT: !82 = !DILocation(line: 35, column: 10, scope: !77) // CHECK:STDOUT: !83 = !DILocation(line: 35, column: 3, scope: !77) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.5bd8d5767580997a", scope: null, file: !3, line: 38, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !85) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.5bd8d5767580997a", scope: null, file: !1, line: 38, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !85) // CHECK:STDOUT: !85 = !{!86, !87} // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !84, type: !30) // CHECK:STDOUT: !87 = !DILocalVariable(arg: 2, scope: !84, type: !30) // CHECK:STDOUT: !88 = !DILocation(line: 39, column: 3, scope: !84) // CHECK:STDOUT: !89 = !DILocation(line: 40, column: 10, scope: !84) // CHECK:STDOUT: !90 = !DILocation(line: 40, column: 3, scope: !84) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c27b765f2159c9a0", scope: null, file: !3, line: 33, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c27b765f2159c9a0", scope: null, file: !1, line: 33, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !92 = !{!93, !94} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !91, type: !23) // CHECK:STDOUT: !94 = !DILocalVariable(arg: 2, scope: !91, type: !30) // CHECK:STDOUT: !95 = !DILocation(line: 34, column: 3, scope: !91) // CHECK:STDOUT: !96 = !DILocation(line: 35, column: 10, scope: !91) // CHECK:STDOUT: !97 = !DILocation(line: 35, column: 3, scope: !91) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c27b765f2159c9a0", scope: null, file: !3, line: 38, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !99) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c27b765f2159c9a0", scope: null, file: !1, line: 38, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !99) // CHECK:STDOUT: !99 = !{!100, !101} // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !98, type: !23) // CHECK:STDOUT: !101 = !DILocalVariable(arg: 2, scope: !98, type: !30) // CHECK:STDOUT: !102 = !DILocation(line: 39, column: 3, scope: !98) // CHECK:STDOUT: !103 = !DILocation(line: 40, column: 10, scope: !98) // CHECK:STDOUT: !104 = !DILocation(line: 40, column: 3, scope: !98) -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2621742a01881e29", scope: null, file: !3, line: 33, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !106) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2621742a01881e29", scope: null, file: !1, line: 33, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !106) // CHECK:STDOUT: !106 = !{!107, !108} // CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !105, type: !23) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 2, scope: !105, type: !30) // CHECK:STDOUT: !109 = !DILocation(line: 34, column: 3, scope: !105) // CHECK:STDOUT: !110 = !DILocation(line: 35, column: 10, scope: !105) // CHECK:STDOUT: !111 = !DILocation(line: 35, column: 3, scope: !105) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2621742a01881e29", scope: null, file: !3, line: 38, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !113) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2621742a01881e29", scope: null, file: !1, line: 38, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !113 = !{!114, !115} // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !112, type: !23) // CHECK:STDOUT: !115 = !DILocalVariable(arg: 2, scope: !112, type: !30) // CHECK:STDOUT: !116 = !DILocation(line: 39, column: 3, scope: !112) // CHECK:STDOUT: !117 = !DILocation(line: 40, column: 10, scope: !112) // CHECK:STDOUT: !118 = !DILocation(line: 40, column: 3, scope: !112) -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !3, line: 43, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !120) +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !1, line: 43, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !120) // CHECK:STDOUT: !120 = !{!121, !122} // CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !119, type: !30) // CHECK:STDOUT: !122 = !DILocalVariable(arg: 2, scope: !119, type: !30) // CHECK:STDOUT: !123 = !DILocation(line: 44, column: 15, scope: !119) // CHECK:STDOUT: !124 = !DILocation(line: 44, column: 10, scope: !119) // CHECK:STDOUT: !125 = !DILocation(line: 44, column: 3, scope: !119) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !3, line: 43, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !127) +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !1, line: 43, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !127) // CHECK:STDOUT: !127 = !{!128, !129} // CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !126, type: !23) // CHECK:STDOUT: !129 = !DILocalVariable(arg: 2, scope: !126, type: !30) // CHECK:STDOUT: !130 = !DILocation(line: 44, column: 15, scope: !126) // CHECK:STDOUT: !131 = !DILocation(line: 44, column: 10, scope: !126) // CHECK:STDOUT: !132 = !DILocation(line: 44, column: 3, scope: !126) -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2621742a01881e29", scope: null, file: !3, line: 43, type: !50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !134) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2621742a01881e29", scope: null, file: !1, line: 43, type: !50, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !134) // CHECK:STDOUT: !134 = !{!135, !136} // CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !133, type: !23) // CHECK:STDOUT: !136 = !DILocalVariable(arg: 2, scope: !133, type: !30) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon index cc99e1a72400..b40073959de0 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_impl.carbon @@ -107,29 +107,29 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 12, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 20, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !1, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 24, column: 12, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 24, column: 3, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !DILocation(line: 40, column: 3, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 41, column: 3, scope: !12) // CHECK:STDOUT: !18 = !DILocation(line: 39, column: 1, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c81631f865470482", scope: null, file: !3, line: 30, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c81631f865470482", scope: null, file: !1, line: 30, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{!15, !15} // CHECK:STDOUT: !22 = !{!23} @@ -141,7 +141,7 @@ fn Run() { // CHECK:STDOUT: !28 = !DILocation(line: 36, column: 15, scope: !19) // CHECK:STDOUT: !29 = !DILocation(line: 36, column: 10, scope: !19) // CHECK:STDOUT: !30 = !DILocation(line: 36, column: 3, scope: !19) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0b241ec84a68877b", scope: null, file: !3, line: 30, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0b241ec84a68877b", scope: null, file: !1, line: 30, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !15) // CHECK:STDOUT: !34 = !DILocation(line: 31, column: 3, scope: !31) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon index 409752c5e86d..f418b6fddd40 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon @@ -184,14 +184,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_mutual.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_mutual.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 33, column: 3, scope: !4) @@ -207,21 +207,21 @@ fn M() { // CHECK:STDOUT: !17 = !DILocation(line: 41, column: 5, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 41, column: 3, scope: !4) // CHECK:STDOUT: !19 = !DILocation(line: 32, column: 1, scope: !4) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 34, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 34, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 34, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 33, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 33, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !27, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 33, column: 3, scope: !27) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !3, line: 18, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 18, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!30, !30, !30} // CHECK:STDOUT: !37 = !{!38, !39} @@ -233,7 +233,7 @@ fn M() { // CHECK:STDOUT: !43 = !DILocation(line: 22, column: 15, scope: !34) // CHECK:STDOUT: !44 = !DILocation(line: 22, column: 10, scope: !34) // CHECK:STDOUT: !45 = !DILocation(line: 22, column: 3, scope: !34) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !3, line: 18, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !1, line: 18, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!23, !23, !30} // CHECK:STDOUT: !49 = !{!50, !51} @@ -245,7 +245,7 @@ fn M() { // CHECK:STDOUT: !55 = !DILocation(line: 22, column: 15, scope: !46) // CHECK:STDOUT: !56 = !DILocation(line: 22, column: 10, scope: !46) // CHECK:STDOUT: !57 = !DILocation(line: 22, column: 3, scope: !46) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !3, line: 18, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !59) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !1, line: 18, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !59) // CHECK:STDOUT: !59 = !{!60, !61} // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !58, type: !23) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 2, scope: !58, type: !30) @@ -255,7 +255,7 @@ fn M() { // CHECK:STDOUT: !65 = !DILocation(line: 22, column: 15, scope: !58) // CHECK:STDOUT: !66 = !DILocation(line: 22, column: 10, scope: !58) // CHECK:STDOUT: !67 = !DILocation(line: 22, column: 3, scope: !58) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !3, line: 25, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !1, line: 25, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !69) // CHECK:STDOUT: !69 = !{!70, !71} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !68, type: !30) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 2, scope: !68, type: !30) @@ -265,7 +265,7 @@ fn M() { // CHECK:STDOUT: !75 = !DILocation(line: 29, column: 15, scope: !68) // CHECK:STDOUT: !76 = !DILocation(line: 29, column: 10, scope: !68) // CHECK:STDOUT: !77 = !DILocation(line: 29, column: 3, scope: !68) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !3, line: 25, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !79) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !1, line: 25, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !79) // CHECK:STDOUT: !79 = !{!80, !81} // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !78, type: !23) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 2, scope: !78, type: !30) @@ -275,7 +275,7 @@ fn M() { // CHECK:STDOUT: !85 = !DILocation(line: 29, column: 15, scope: !78) // CHECK:STDOUT: !86 = !DILocation(line: 29, column: 10, scope: !78) // CHECK:STDOUT: !87 = !DILocation(line: 29, column: 3, scope: !78) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !3, line: 25, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !89) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !1, line: 25, type: !47, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !89) // CHECK:STDOUT: !89 = !{!90, !91} // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !88, type: !23) // CHECK:STDOUT: !91 = !DILocalVariable(arg: 2, scope: !88, type: !30) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon index 457dda9b6b92..0160f67ced72 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon @@ -103,14 +103,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_reorder.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_reorder.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 23, column: 3, scope: !4) @@ -126,21 +126,21 @@ fn M() { // CHECK:STDOUT: !17 = !DILocation(line: 31, column: 14, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 31, column: 3, scope: !4) // CHECK:STDOUT: !19 = !DILocation(line: 22, column: 1, scope: !4) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 24, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 24, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 24, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 23, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 23, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !27, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 23, column: 3, scope: !27) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.369f53a8d4c38871", scope: null, file: !3, line: 15, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.369f53a8d4c38871", scope: null, file: !1, line: 15, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!30, !23, !23, !30} // CHECK:STDOUT: !37 = !{!38, !39, !40} diff --git a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon index 7ac99ab15cab..7e1c6032b473 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon @@ -281,14 +281,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_reorder_more.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_reorder_more.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 23, column: 3, scope: !4) @@ -349,35 +349,35 @@ fn M() { // CHECK:STDOUT: !62 = !DILocation(line: 52, column: 25, scope: !4) // CHECK:STDOUT: !63 = !DILocation(line: 52, column: 3, scope: !4) // CHECK:STDOUT: !64 = !DILocation(line: 22, column: 1, scope: !4) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 26, type: !66, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 26, type: !66, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !69) // CHECK:STDOUT: !66 = !DISubroutineType(types: !67) // CHECK:STDOUT: !67 = !{null, !68} // CHECK:STDOUT: !68 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !69 = !{!70} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !65, type: !68) // CHECK:STDOUT: !71 = !DILocation(line: 26, column: 3, scope: !65) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fbec46972c1998a0:core.Destroy.Core", scope: null, file: !3, line: 25, type: !73, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !76) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fbec46972c1998a0:core.Destroy.Core", scope: null, file: !1, line: 25, type: !73, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !76) // CHECK:STDOUT: !73 = !DISubroutineType(types: !74) // CHECK:STDOUT: !74 = !{null, !75} // CHECK:STDOUT: !75 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) // CHECK:STDOUT: !76 = !{!77} // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !72, type: !75) // CHECK:STDOUT: !78 = !DILocation(line: 25, column: 3, scope: !72) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 24, type: !80, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 24, type: !80, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !80 = !DISubroutineType(types: !81) // CHECK:STDOUT: !81 = !{null, !82} // CHECK:STDOUT: !82 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !83 = !{!84} // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !79, type: !82) // CHECK:STDOUT: !85 = !DILocation(line: 24, column: 3, scope: !79) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !3, line: 23, type: !87, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !90) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !1, line: 23, type: !87, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !90) // CHECK:STDOUT: !87 = !DISubroutineType(types: !88) // CHECK:STDOUT: !88 = !{null, !89} // CHECK:STDOUT: !89 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !90 = !{!91} // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !86, type: !89) // CHECK:STDOUT: !92 = !DILocation(line: 23, column: 3, scope: !86) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bb004feba9dd474d", scope: null, file: !3, line: 15, type: !94, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !96) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bb004feba9dd474d", scope: null, file: !1, line: 15, type: !94, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !96) // CHECK:STDOUT: !94 = !DISubroutineType(types: !95) // CHECK:STDOUT: !95 = !{!82, !89, !68, !68, !82} // CHECK:STDOUT: !96 = !{!97, !98, !99, !100} @@ -391,7 +391,7 @@ fn M() { // CHECK:STDOUT: !104 = !DILocation(line: 19, column: 21, scope: !93) // CHECK:STDOUT: !105 = !DILocation(line: 19, column: 10, scope: !93) // CHECK:STDOUT: !106 = !DILocation(line: 19, column: 3, scope: !93) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f24eb6b05368f488", scope: null, file: !3, line: 15, type: !108, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f24eb6b05368f488", scope: null, file: !1, line: 15, type: !108, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !110) // CHECK:STDOUT: !108 = !DISubroutineType(types: !109) // CHECK:STDOUT: !109 = !{!82, !82, !68, !68, !82} // CHECK:STDOUT: !110 = !{!111, !112, !113, !114} @@ -405,7 +405,7 @@ fn M() { // CHECK:STDOUT: !118 = !DILocation(line: 19, column: 21, scope: !107) // CHECK:STDOUT: !119 = !DILocation(line: 19, column: 10, scope: !107) // CHECK:STDOUT: !120 = !DILocation(line: 19, column: 3, scope: !107) -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.427cba2b3278d1dc", scope: null, file: !3, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !124) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.427cba2b3278d1dc", scope: null, file: !1, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !124) // CHECK:STDOUT: !122 = !DISubroutineType(types: !123) // CHECK:STDOUT: !123 = !{!82, !68, !68, !68, !82} // CHECK:STDOUT: !124 = !{!125, !126, !127, !128} @@ -419,7 +419,7 @@ fn M() { // CHECK:STDOUT: !132 = !DILocation(line: 19, column: 21, scope: !121) // CHECK:STDOUT: !133 = !DILocation(line: 19, column: 10, scope: !121) // CHECK:STDOUT: !134 = !DILocation(line: 19, column: 3, scope: !121) -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ea32bb7f769e7967", scope: null, file: !3, line: 15, type: !136, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !138) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ea32bb7f769e7967", scope: null, file: !1, line: 15, type: !136, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !138) // CHECK:STDOUT: !136 = !DISubroutineType(types: !137) // CHECK:STDOUT: !137 = !{!82, !75, !68, !68, !82} // CHECK:STDOUT: !138 = !{!139, !140, !141, !142} @@ -433,7 +433,7 @@ fn M() { // CHECK:STDOUT: !146 = !DILocation(line: 19, column: 21, scope: !135) // CHECK:STDOUT: !147 = !DILocation(line: 19, column: 10, scope: !135) // CHECK:STDOUT: !148 = !DILocation(line: 19, column: 3, scope: !135) -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6eab5c6411742e70", scope: null, file: !3, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !150) +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6eab5c6411742e70", scope: null, file: !1, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !150) // CHECK:STDOUT: !150 = !{!151, !152, !153, !154} // CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !149, type: !68) // CHECK:STDOUT: !152 = !DILocalVariable(arg: 2, scope: !149, type: !68) @@ -445,7 +445,7 @@ fn M() { // CHECK:STDOUT: !158 = !DILocation(line: 19, column: 21, scope: !149) // CHECK:STDOUT: !159 = !DILocation(line: 19, column: 10, scope: !149) // CHECK:STDOUT: !160 = !DILocation(line: 19, column: 3, scope: !149) -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.732da705e71cd359", scope: null, file: !3, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !162) +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.732da705e71cd359", scope: null, file: !1, line: 15, type: !122, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !162) // CHECK:STDOUT: !162 = !{!163, !164, !165, !166} // CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !161, type: !68) // CHECK:STDOUT: !164 = !DILocalVariable(arg: 2, scope: !161, type: !68) @@ -457,7 +457,7 @@ fn M() { // CHECK:STDOUT: !170 = !DILocation(line: 19, column: 21, scope: !161) // CHECK:STDOUT: !171 = !DILocation(line: 19, column: 10, scope: !161) // CHECK:STDOUT: !172 = !DILocation(line: 19, column: 3, scope: !161) -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b1f6aa8c7fcac0ca", scope: null, file: !3, line: 15, type: !136, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !174) +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b1f6aa8c7fcac0ca", scope: null, file: !1, line: 15, type: !136, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !174) // CHECK:STDOUT: !174 = !{!175, !176, !177, !178} // CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !173, type: !75) // CHECK:STDOUT: !176 = !DILocalVariable(arg: 2, scope: !173, type: !68) diff --git a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon index 8069784c3b5e..a5a1b58d2de8 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon @@ -371,14 +371,14 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_recursive_sccs_deep.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 73, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_recursive_sccs_deep.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 73, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 74, column: 3, scope: !4) @@ -394,21 +394,21 @@ fn M() { // CHECK:STDOUT: !17 = !DILocation(line: 82, column: 5, scope: !4) // CHECK:STDOUT: !18 = !DILocation(line: 82, column: 3, scope: !4) // CHECK:STDOUT: !19 = !DILocation(line: 73, column: 1, scope: !4) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 75, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 75, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 75, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 74, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 74, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !27, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 74, column: 3, scope: !27) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.5bd8d5767580997a", scope: null, file: !3, line: 31, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.5bd8d5767580997a", scope: null, file: !1, line: 31, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!30, !30, !30} // CHECK:STDOUT: !37 = !{!38, !39} @@ -417,7 +417,7 @@ fn M() { // CHECK:STDOUT: !40 = !DILocation(line: 32, column: 3, scope: !34) // CHECK:STDOUT: !41 = !DILocation(line: 33, column: 10, scope: !34) // CHECK:STDOUT: !42 = !DILocation(line: 33, column: 3, scope: !34) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c27b765f2159c9a0", scope: null, file: !3, line: 31, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c27b765f2159c9a0", scope: null, file: !1, line: 31, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !44 = !DISubroutineType(types: !45) // CHECK:STDOUT: !45 = !{!23, !23, !30} // CHECK:STDOUT: !46 = !{!47, !48} @@ -426,14 +426,14 @@ fn M() { // CHECK:STDOUT: !49 = !DILocation(line: 32, column: 3, scope: !43) // CHECK:STDOUT: !50 = !DILocation(line: 33, column: 10, scope: !43) // CHECK:STDOUT: !51 = !DILocation(line: 33, column: 3, scope: !43) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2621742a01881e29", scope: null, file: !3, line: 31, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2621742a01881e29", scope: null, file: !1, line: 31, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54, !55} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !23) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 2, scope: !52, type: !30) // CHECK:STDOUT: !56 = !DILocation(line: 32, column: 3, scope: !52) // CHECK:STDOUT: !57 = !DILocation(line: 33, column: 10, scope: !52) // CHECK:STDOUT: !58 = !DILocation(line: 33, column: 3, scope: !52) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.5bd8d5767580997a", scope: null, file: !3, line: 36, type: !60, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.5bd8d5767580997a", scope: null, file: !1, line: 36, type: !60, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !60 = !DISubroutineType(types: !61) // CHECK:STDOUT: !61 = !{null, !30, !30} // CHECK:STDOUT: !62 = !{!63, !64} @@ -441,7 +441,7 @@ fn M() { // CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !59, type: !30) // CHECK:STDOUT: !65 = !DILocation(line: 37, column: 3, scope: !59) // CHECK:STDOUT: !66 = !DILocation(line: 36, column: 1, scope: !59) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !3, line: 47, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.5bd8d5767580997a", scope: null, file: !1, line: 47, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69, !70} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !30) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !67, type: !30) @@ -454,7 +454,7 @@ fn M() { // CHECK:STDOUT: !77 = !DILocation(line: 52, column: 5, scope: !67) // CHECK:STDOUT: !78 = !DILocation(line: 54, column: 12, scope: !67) // CHECK:STDOUT: !79 = !DILocation(line: 54, column: 5, scope: !67) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c27b765f2159c9a0", scope: null, file: !3, line: 36, type: !81, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c27b765f2159c9a0", scope: null, file: !1, line: 36, type: !81, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !81 = !DISubroutineType(types: !82) // CHECK:STDOUT: !82 = !{null, !23, !30} // CHECK:STDOUT: !83 = !{!84, !85} @@ -462,7 +462,7 @@ fn M() { // CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !80, type: !30) // CHECK:STDOUT: !86 = !DILocation(line: 37, column: 3, scope: !80) // CHECK:STDOUT: !87 = !DILocation(line: 36, column: 1, scope: !80) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !3, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !89) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c27b765f2159c9a0", scope: null, file: !1, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !89) // CHECK:STDOUT: !89 = !{!90, !91} // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !88, type: !23) // CHECK:STDOUT: !91 = !DILocalVariable(arg: 2, scope: !88, type: !30) @@ -475,13 +475,13 @@ fn M() { // CHECK:STDOUT: !98 = !DILocation(line: 52, column: 5, scope: !88) // CHECK:STDOUT: !99 = !DILocation(line: 54, column: 12, scope: !88) // CHECK:STDOUT: !100 = !DILocation(line: 54, column: 5, scope: !88) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2621742a01881e29", scope: null, file: !3, line: 36, type: !81, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !102) +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2621742a01881e29", scope: null, file: !1, line: 36, type: !81, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !102) // CHECK:STDOUT: !102 = !{!103, !104} // CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !101, type: !23) // CHECK:STDOUT: !104 = !DILocalVariable(arg: 2, scope: !101, type: !30) // CHECK:STDOUT: !105 = !DILocation(line: 37, column: 3, scope: !101) // CHECK:STDOUT: !106 = !DILocation(line: 36, column: 1, scope: !101) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2621742a01881e29", scope: null, file: !3, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !108) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2621742a01881e29", scope: null, file: !1, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !108) // CHECK:STDOUT: !108 = !{!109, !110} // CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !107, type: !23) // CHECK:STDOUT: !110 = !DILocalVariable(arg: 2, scope: !107, type: !30) @@ -494,7 +494,7 @@ fn M() { // CHECK:STDOUT: !117 = !DILocation(line: 52, column: 5, scope: !107) // CHECK:STDOUT: !118 = !DILocation(line: 54, column: 12, scope: !107) // CHECK:STDOUT: !119 = !DILocation(line: 54, column: 5, scope: !107) -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.5bd8d5767580997a", scope: null, file: !3, line: 40, type: !60, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !121) +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.5bd8d5767580997a", scope: null, file: !1, line: 40, type: !60, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !121) // CHECK:STDOUT: !121 = !{!122, !123} // CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !120, type: !30) // CHECK:STDOUT: !123 = !DILocalVariable(arg: 2, scope: !120, type: !30) @@ -505,19 +505,19 @@ fn M() { // CHECK:STDOUT: !128 = !DILocation(line: 43, column: 5, scope: !120) // CHECK:STDOUT: !129 = !DILocation(line: 41, column: 3, scope: !120) // CHECK:STDOUT: !130 = !DILocation(line: 40, column: 1, scope: !120) -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.5bd8d5767580997a", scope: null, file: !3, line: 60, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !132) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.5bd8d5767580997a", scope: null, file: !1, line: 60, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !132) // CHECK:STDOUT: !132 = !{!133, !134} // CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !131, type: !30) // CHECK:STDOUT: !134 = !DILocalVariable(arg: 2, scope: !131, type: !30) // CHECK:STDOUT: !135 = !DILocation(line: 61, column: 10, scope: !131) // CHECK:STDOUT: !136 = !DILocation(line: 61, column: 3, scope: !131) -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !3, line: 64, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !138) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 64, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !138) // CHECK:STDOUT: !138 = !{!139, !140} // CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !137, type: !30) // CHECK:STDOUT: !140 = !DILocalVariable(arg: 2, scope: !137, type: !30) // CHECK:STDOUT: !141 = !DILocation(line: 65, column: 10, scope: !137) // CHECK:STDOUT: !142 = !DILocation(line: 65, column: 3, scope: !137) -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c27b765f2159c9a0", scope: null, file: !3, line: 40, type: !81, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !144) +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c27b765f2159c9a0", scope: null, file: !1, line: 40, type: !81, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !144) // CHECK:STDOUT: !144 = !{!145, !146} // CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !143, type: !23) // CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !143, type: !30) @@ -528,19 +528,19 @@ fn M() { // CHECK:STDOUT: !151 = !DILocation(line: 43, column: 5, scope: !143) // CHECK:STDOUT: !152 = !DILocation(line: 41, column: 3, scope: !143) // CHECK:STDOUT: !153 = !DILocation(line: 40, column: 1, scope: !143) -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.c27b765f2159c9a0", scope: null, file: !3, line: 60, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !155) +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.c27b765f2159c9a0", scope: null, file: !1, line: 60, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !155) // CHECK:STDOUT: !155 = !{!156, !157} // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !154, type: !23) // CHECK:STDOUT: !157 = !DILocalVariable(arg: 2, scope: !154, type: !30) // CHECK:STDOUT: !158 = !DILocation(line: 61, column: 10, scope: !154) // CHECK:STDOUT: !159 = !DILocation(line: 61, column: 3, scope: !154) -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !3, line: 64, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !161) +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !1, line: 64, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !161) // CHECK:STDOUT: !161 = !{!162, !163} // CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !160, type: !23) // CHECK:STDOUT: !163 = !DILocalVariable(arg: 2, scope: !160, type: !30) // CHECK:STDOUT: !164 = !DILocation(line: 65, column: 10, scope: !160) // CHECK:STDOUT: !165 = !DILocation(line: 65, column: 3, scope: !160) -// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2621742a01881e29", scope: null, file: !3, line: 40, type: !81, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !167) +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2621742a01881e29", scope: null, file: !1, line: 40, type: !81, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !167) // CHECK:STDOUT: !167 = !{!168, !169} // CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !166, type: !23) // CHECK:STDOUT: !169 = !DILocalVariable(arg: 2, scope: !166, type: !30) @@ -551,33 +551,33 @@ fn M() { // CHECK:STDOUT: !174 = !DILocation(line: 43, column: 5, scope: !166) // CHECK:STDOUT: !175 = !DILocation(line: 41, column: 3, scope: !166) // CHECK:STDOUT: !176 = !DILocation(line: 40, column: 1, scope: !166) -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.2621742a01881e29", scope: null, file: !3, line: 60, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !178) +// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.2621742a01881e29", scope: null, file: !1, line: 60, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !178) // CHECK:STDOUT: !178 = !{!179, !180} // CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !177, type: !23) // CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !177, type: !30) // CHECK:STDOUT: !181 = !DILocation(line: 61, column: 10, scope: !177) // CHECK:STDOUT: !182 = !DILocation(line: 61, column: 3, scope: !177) -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !3, line: 64, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !184) +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !1, line: 64, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !184) // CHECK:STDOUT: !184 = !{!185, !186} // CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !183, type: !23) // CHECK:STDOUT: !186 = !DILocalVariable(arg: 2, scope: !183, type: !30) // CHECK:STDOUT: !187 = !DILocation(line: 65, column: 10, scope: !183) // CHECK:STDOUT: !188 = !DILocation(line: 65, column: 3, scope: !183) -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !3, line: 68, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !190) +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !1, line: 68, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !190) // CHECK:STDOUT: !190 = !{!191, !192} // CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !189, type: !30) // CHECK:STDOUT: !192 = !DILocalVariable(arg: 2, scope: !189, type: !30) // CHECK:STDOUT: !193 = !DILocation(line: 69, column: 15, scope: !189) // CHECK:STDOUT: !194 = !DILocation(line: 69, column: 10, scope: !189) // CHECK:STDOUT: !195 = !DILocation(line: 69, column: 3, scope: !189) -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !3, line: 68, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !197) +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !1, line: 68, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !197) // CHECK:STDOUT: !197 = !{!198, !199} // CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !196, type: !23) // CHECK:STDOUT: !199 = !DILocalVariable(arg: 2, scope: !196, type: !30) // CHECK:STDOUT: !200 = !DILocation(line: 69, column: 15, scope: !196) // CHECK:STDOUT: !201 = !DILocation(line: 69, column: 10, scope: !196) // CHECK:STDOUT: !202 = !DILocation(line: 69, column: 3, scope: !196) -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !3, line: 68, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !204) +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !1, line: 68, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !204) // CHECK:STDOUT: !204 = !{!205, !206} // CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !203, type: !23) // CHECK:STDOUT: !206 = !DILocalVariable(arg: 2, scope: !203, type: !30) diff --git a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon index 7868db470d2a..2165f93239ce 100644 --- a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon +++ b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon @@ -206,21 +206,21 @@ fn M() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_specific_in_class.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_specific_in_class.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 24, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !3, line: 32, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !1, line: 32, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 33, column: 3, scope: !11) @@ -241,85 +241,85 @@ fn M() { // CHECK:STDOUT: !29 = !DILocation(line: 42, column: 3, scope: !11) // CHECK:STDOUT: !30 = !DILocation(line: 44, column: 3, scope: !11) // CHECK:STDOUT: !31 = !DILocation(line: 32, column: 1, scope: !11) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 41, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 41, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !35 = !DILocation(line: 41, column: 3, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 39, type: !37, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 39, type: !37, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !37 = !DISubroutineType(types: !38) // CHECK:STDOUT: !38 = !{null, !39} // CHECK:STDOUT: !39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !36, type: !39) // CHECK:STDOUT: !42 = !DILocation(line: 39, column: 3, scope: !36) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !3, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2621742a01881e29", scope: null, file: !1, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !44 = !DISubroutineType(types: !45) // CHECK:STDOUT: !45 = !{!7, !7} // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !48 = !DILocation(line: 29, column: 10, scope: !43) // CHECK:STDOUT: !49 = !DILocation(line: 29, column: 3, scope: !43) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !3, line: 28, type: !51, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 28, type: !51, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !51 = !DISubroutineType(types: !52) // CHECK:STDOUT: !52 = !{!39, !39} // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !50, type: !39) // CHECK:STDOUT: !55 = !DILocation(line: 29, column: 10, scope: !50) // CHECK:STDOUT: !56 = !DILocation(line: 29, column: 3, scope: !50) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !3, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !58) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c27b765f2159c9a0", scope: null, file: !1, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !58 = !{!59} // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !57, type: !7) // CHECK:STDOUT: !60 = !DILocation(line: 29, column: 10, scope: !57) // CHECK:STDOUT: !61 = !DILocation(line: 29, column: 3, scope: !57) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 28, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !63 = !{!64} // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !62, type: !7) // CHECK:STDOUT: !65 = !DILocation(line: 29, column: 10, scope: !62) // CHECK:STDOUT: !66 = !DILocation(line: 29, column: 3, scope: !62) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !3, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2621742a01881e29", scope: null, file: !1, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !7) // CHECK:STDOUT: !70 = !DILocation(line: 24, column: 3, scope: !67) // CHECK:STDOUT: !71 = !DILocation(line: 25, column: 10, scope: !67) // CHECK:STDOUT: !72 = !DILocation(line: 25, column: 3, scope: !67) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !3, line: 23, type: !51, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.5bd8d5767580997a", scope: null, file: !1, line: 23, type: !51, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !39) // CHECK:STDOUT: !76 = !DILocation(line: 24, column: 3, scope: !73) // CHECK:STDOUT: !77 = !DILocation(line: 25, column: 10, scope: !73) // CHECK:STDOUT: !78 = !DILocation(line: 25, column: 3, scope: !73) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !3, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !80) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c27b765f2159c9a0", scope: null, file: !1, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !80) // CHECK:STDOUT: !80 = !{!81} // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !79, type: !7) // CHECK:STDOUT: !82 = !DILocation(line: 24, column: 3, scope: !79) // CHECK:STDOUT: !83 = !DILocation(line: 25, column: 10, scope: !79) // CHECK:STDOUT: !84 = !DILocation(line: 25, column: 3, scope: !79) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !86 = !{!87} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !85, type: !7) // CHECK:STDOUT: !88 = !DILocation(line: 24, column: 3, scope: !85) // CHECK:STDOUT: !89 = !DILocation(line: 25, column: 10, scope: !85) // CHECK:STDOUT: !90 = !DILocation(line: 25, column: 3, scope: !85) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.2621742a01881e29", scope: null, file: !3, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.2621742a01881e29", scope: null, file: !1, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !94) // CHECK:STDOUT: !92 = !DISubroutineType(types: !93) // CHECK:STDOUT: !93 = !{!7, !7, !7} // CHECK:STDOUT: !94 = !{!95, !96} // CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !91, type: !7) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 2, scope: !91, type: !7) // CHECK:STDOUT: !97 = !DILocation(line: 19, column: 5, scope: !91) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.5bd8d5767580997a", scope: null, file: !3, line: 18, type: !99, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !101) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.5bd8d5767580997a", scope: null, file: !1, line: 18, type: !99, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !101) // CHECK:STDOUT: !99 = !DISubroutineType(types: !100) // CHECK:STDOUT: !100 = !{!39, !7, !39} // CHECK:STDOUT: !101 = !{!102, !103} // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !98, type: !7) // CHECK:STDOUT: !103 = !DILocalVariable(arg: 2, scope: !98, type: !39) // CHECK:STDOUT: !104 = !DILocation(line: 19, column: 5, scope: !98) -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c27b765f2159c9a0", scope: null, file: !3, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !106) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c27b765f2159c9a0", scope: null, file: !1, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !106) // CHECK:STDOUT: !106 = !{!107, !108} // CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !105, type: !7) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 2, scope: !105, type: !7) // CHECK:STDOUT: !109 = !DILocation(line: 19, column: 5, scope: !105) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.ee509b43cf4eb3c5", scope: null, file: !3, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !111) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.ee509b43cf4eb3c5", scope: null, file: !1, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !111) // CHECK:STDOUT: !111 = !{!112, !113} // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !110, type: !7) // CHECK:STDOUT: !113 = !DILocalVariable(arg: 2, scope: !110, type: !7) diff --git a/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon b/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon index 5d6196b428cf..a18d43330274 100644 --- a/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon +++ b/toolchain/lower/testdata/function/generic/cross_library_name_collision_private.carbon @@ -54,23 +54,23 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'lib1.carbon' // CHECK:STDOUT: source_filename = "lib1.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "lib1.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "lib1.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'lib2.carbon' // CHECK:STDOUT: source_filename = "lib2.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "lib2.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "lib2.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'todo_use.carbon' // CHECK:STDOUT: source_filename = "todo_use.carbon" // CHECK:STDOUT: @@ -104,21 +104,21 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "todo_use.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "todo_use.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 10, column: 16, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 11, column: 16, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 9, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Lib1CallF", linkageName: "_CLib1CallF.Main.5bd8d5767580997a", scope: null, file: !12, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Lib1CallF", linkageName: "_CLib1CallF.Main.5bd8d5767580997a", scope: null, file: !12, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DIFile(filename: "lib1.carbon", directory: "") // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!7, !7, !7} @@ -127,14 +127,14 @@ fn Run() { // CHECK:STDOUT: !17 = !DILocalVariable(arg: 2, scope: !11, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 9, column: 10, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 9, column: 3, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Lib2CallF", linkageName: "_CLib2CallF.Main.5bd8d5767580997a", scope: null, file: !21, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Lib2CallF", linkageName: "_CLib2CallF.Main.5bd8d5767580997a", scope: null, file: !21, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !21 = !DIFile(filename: "lib2.carbon", directory: "") // CHECK:STDOUT: !22 = !{!23, !24} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !24 = !DILocalVariable(arg: 2, scope: !20, type: !7) // CHECK:STDOUT: !25 = !DILocation(line: 12, column: 10, scope: !20) // CHECK:STDOUT: !26 = !DILocation(line: 12, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !12, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !12, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29, !30} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocalVariable(arg: 2, scope: !27, type: !7) diff --git a/toolchain/lower/testdata/function/generic/import.carbon b/toolchain/lower/testdata/function/generic/import.carbon index 50c882b8d7c6..30ebdd2c3a13 100644 --- a/toolchain/lower/testdata/function/generic/import.carbon +++ b/toolchain/lower/testdata/function/generic/import.carbon @@ -69,14 +69,14 @@ fn Call() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "indirectly_imported.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "IndirectDefined", linkageName: "_CIndirectDefined.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "indirectly_imported.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "IndirectDefined", linkageName: "_CIndirectDefined.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 6, column: 1, scope: !4) @@ -93,14 +93,14 @@ fn Call() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "directly_imported.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DirectDefined", linkageName: "_CDirectDefined.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "directly_imported.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DirectDefined", linkageName: "_CDirectDefined.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 8, column: 1, scope: !4) @@ -161,14 +161,14 @@ fn Call() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -178,13 +178,13 @@ fn Call() -> i32 { // CHECK:STDOUT: !11 = !DILocation(line: 9, column: 11, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 9, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !7} // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !14, type: !7) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 3, scope: !14) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "DirectGeneric", linkageName: "_CDirectGeneric.Main.84588f41d61dafba", scope: null, file: !21, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "DirectGeneric", linkageName: "_CDirectGeneric.Main.84588f41d61dafba", scope: null, file: !21, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !21 = !DIFile(filename: "directly_imported.carbon", directory: "") // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{!24, !24} @@ -195,7 +195,7 @@ fn Call() -> i32 { // CHECK:STDOUT: !28 = !DILocation(line: 12, column: 3, scope: !20) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 10, scope: !20) // CHECK:STDOUT: !30 = !DILocation(line: 13, column: 3, scope: !20) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.84588f41d61dafba", scope: null, file: !32, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.84588f41d61dafba", scope: null, file: !32, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !32 = !DIFile(filename: "indirectly_imported.carbon", directory: "") // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !31, type: !24) diff --git a/toolchain/lower/testdata/function/generic/import_core_witness.carbon b/toolchain/lower/testdata/function/generic/import_core_witness.carbon index ac575e26226e..e4fa3e54d528 100644 --- a/toolchain/lower/testdata/function/generic/import_core_witness.carbon +++ b/toolchain/lower/testdata/function/generic/import_core_witness.carbon @@ -39,14 +39,14 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "lib.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "lib.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -80,20 +80,20 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "main.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "main.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 4, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.79e272ab3b2c3188", scope: null, file: !11, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.79e272ab3b2c3188", scope: null, file: !11, line: 4, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DIFile(filename: "lib.carbon", directory: "") // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} diff --git a/toolchain/lower/testdata/function/generic/import_unused_def.carbon b/toolchain/lower/testdata/function/generic/import_unused_def.carbon index feee4b4ce4c2..4a352ff387ca 100644 --- a/toolchain/lower/testdata/function/generic/import_unused_def.carbon +++ b/toolchain/lower/testdata/function/generic/import_unused_def.carbon @@ -63,27 +63,27 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Foo.Main:Copy.Core", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Foo.Main:Copy.Core", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 5, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7a21de4d15dcb5df:core.Destroy.Core", scope: null, file: !3, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7a21de4d15dcb5df:core.Destroy.Core", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 18, column: 3, scope: !17) @@ -124,19 +124,19 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 4, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !10, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !10, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !10 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{!13, !14} diff --git a/toolchain/lower/testdata/function/generic/local_function.carbon b/toolchain/lower/testdata/function/generic/local_function.carbon index a33b1baca617..2e842b26926e 100644 --- a/toolchain/lower/testdata/function/generic/local_function.carbon +++ b/toolchain/lower/testdata/function/generic/local_function.carbon @@ -48,27 +48,27 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "local_function.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "local_function.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 23, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 23, column: 3, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !3, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5bd8d5767580997a", scope: null, file: !1, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{!7, !7} // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !10, type: !7) // CHECK:STDOUT: !15 = !DILocation(line: 19, column: 10, scope: !10) // CHECK:STDOUT: !16 = !DILocation(line: 19, column: 3, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.5bd8d5767580997a", scope: null, file: !3, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG:enclosed.5bd8d5767580997a", scope: null, file: !1, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 18, column: 21, scope: !17) diff --git a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon index bb0d41c00a81..6c50bc85f875 100644 --- a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon @@ -174,14 +174,14 @@ fn Main() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "reverse_canonical.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 43, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "reverse_canonical.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 43, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 44, column: 3, scope: !4) @@ -191,7 +191,7 @@ fn Main() { // CHECK:STDOUT: !11 = !DILocation(line: 47, column: 15, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 47, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 43, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.36f5e0b0ce09cb9a", scope: null, file: !3, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.36f5e0b0ce09cb9a", scope: null, file: !1, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17, !17, !17} // CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -203,7 +203,7 @@ fn Main() { // CHECK:STDOUT: !23 = !DILocation(line: 23, column: 22, scope: !14) // CHECK:STDOUT: !24 = !DILocation(line: 23, column: 3, scope: !14) // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 1, scope: !14) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.0f29a29bf45af723", scope: null, file: !3, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.0f29a29bf45af723", scope: null, file: !1, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28, !29, !30} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !17) // CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !26, type: !17) @@ -213,7 +213,7 @@ fn Main() { // CHECK:STDOUT: !33 = !DILocation(line: 30, column: 21, scope: !26) // CHECK:STDOUT: !34 = !DILocation(line: 30, column: 3, scope: !26) // CHECK:STDOUT: !35 = !DILocation(line: 26, column: 1, scope: !26) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.81f1c9de445b895c", scope: null, file: !3, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.81f1c9de445b895c", scope: null, file: !1, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !37 = !{!38, !39, !40} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !36, type: !17) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 2, scope: !36, type: !17) @@ -222,7 +222,7 @@ fn Main() { // CHECK:STDOUT: !42 = !DILocation(line: 23, column: 22, scope: !36) // CHECK:STDOUT: !43 = !DILocation(line: 23, column: 3, scope: !36) // CHECK:STDOUT: !44 = !DILocation(line: 20, column: 1, scope: !36) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.0f29a29bf45af723", scope: null, file: !3, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.0f29a29bf45af723", scope: null, file: !1, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47, !48, !49} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !17) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 2, scope: !45, type: !17) @@ -233,7 +233,7 @@ fn Main() { // CHECK:STDOUT: !53 = !DILocation(line: 36, column: 3, scope: !45) // CHECK:STDOUT: !54 = !DILocation(line: 37, column: 3, scope: !45) // CHECK:STDOUT: !55 = !DILocation(line: 33, column: 1, scope: !45) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.e1ce67f3c23ab61f", scope: null, file: !3, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.e1ce67f3c23ab61f", scope: null, file: !1, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !57) // CHECK:STDOUT: !57 = !{!58, !59, !60} // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !56, type: !17) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 2, scope: !56, type: !17) @@ -243,13 +243,13 @@ fn Main() { // CHECK:STDOUT: !63 = !DILocation(line: 30, column: 21, scope: !56) // CHECK:STDOUT: !64 = !DILocation(line: 30, column: 3, scope: !56) // CHECK:STDOUT: !65 = !DILocation(line: 26, column: 1, scope: !56) -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.c6787c0e2572c86c", scope: null, file: !3, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !67) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.c6787c0e2572c86c", scope: null, file: !1, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !67) // CHECK:STDOUT: !67 = !{!68, !69, !70} // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !66, type: !17) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 2, scope: !66, type: !17) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 3, scope: !66, type: !17) // CHECK:STDOUT: !71 = !DILocation(line: 40, column: 1, scope: !66) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.e1ce67f3c23ab61f", scope: null, file: !3, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !73) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.e1ce67f3c23ab61f", scope: null, file: !1, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !73) // CHECK:STDOUT: !73 = !{!74, !75, !76} // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !17) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 2, scope: !72, type: !17) @@ -258,7 +258,7 @@ fn Main() { // CHECK:STDOUT: !78 = !DILocation(line: 23, column: 22, scope: !72) // CHECK:STDOUT: !79 = !DILocation(line: 23, column: 3, scope: !72) // CHECK:STDOUT: !80 = !DILocation(line: 20, column: 1, scope: !72) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.e1ce67f3c23ab61f", scope: null, file: !3, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.e1ce67f3c23ab61f", scope: null, file: !1, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !82) // CHECK:STDOUT: !82 = !{!83, !84, !85} // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !81, type: !17) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 2, scope: !81, type: !17) @@ -269,7 +269,7 @@ fn Main() { // CHECK:STDOUT: !89 = !DILocation(line: 36, column: 3, scope: !81) // CHECK:STDOUT: !90 = !DILocation(line: 37, column: 3, scope: !81) // CHECK:STDOUT: !91 = !DILocation(line: 33, column: 1, scope: !81) -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.901b24db5c2cfe42", scope: null, file: !3, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !93) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.901b24db5c2cfe42", scope: null, file: !1, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !93) // CHECK:STDOUT: !93 = !{!94, !95, !96} // CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !92, type: !17) // CHECK:STDOUT: !95 = !DILocalVariable(arg: 2, scope: !92, type: !17) diff --git a/toolchain/lower/testdata/function/generic/self_canonical.carbon b/toolchain/lower/testdata/function/generic/self_canonical.carbon index ec88fc5c7ff2..f2256ae19e8c 100644 --- a/toolchain/lower/testdata/function/generic/self_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/self_canonical.carbon @@ -172,21 +172,21 @@ fn Main_method_no_template () { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "self_canonical.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main_method_no_template", linkageName: "_CMain_method_no_template.Main", scope: null, file: !3, line: 79, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "self_canonical.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main_method_no_template", linkageName: "_CMain_method_no_template.Main", scope: null, file: !1, line: 79, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 80, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 82, column: 18, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 82, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 79, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "fourth_function", linkageName: "_Cfourth_function.Main.4da09b2222fc2513", scope: null, file: !3, line: 49, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "fourth_function", linkageName: "_Cfourth_function.Main.4da09b2222fc2513", scope: null, file: !1, line: 49, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -199,7 +199,7 @@ fn Main_method_no_template () { // CHECK:STDOUT: !21 = !DILocation(line: 54, column: 18, scope: !11) // CHECK:STDOUT: !22 = !DILocation(line: 54, column: 3, scope: !11) // CHECK:STDOUT: !23 = !DILocation(line: 49, column: 1, scope: !11) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "first_function", linkageName: "_Cfirst_function.Main.ee57965601b4d646", scope: null, file: !3, line: 57, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "first_function", linkageName: "_Cfirst_function.Main.ee57965601b4d646", scope: null, file: !1, line: 57, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !14) // CHECK:STDOUT: !27 = !DILocation(line: 58, column: 3, scope: !24) @@ -208,7 +208,7 @@ fn Main_method_no_template () { // CHECK:STDOUT: !30 = !DILocation(line: 61, column: 27, scope: !24) // CHECK:STDOUT: !31 = !DILocation(line: 61, column: 3, scope: !24) // CHECK:STDOUT: !32 = !DILocation(line: 57, column: 1, scope: !24) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "second_function", linkageName: "_Csecond_function.Main.efd9fcdf727c9de5", scope: null, file: !3, line: 70, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "second_function", linkageName: "_Csecond_function.Main.efd9fcdf727c9de5", scope: null, file: !1, line: 70, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !34 = !DISubroutineType(types: !35) // CHECK:STDOUT: !35 = !{null, !14, !14, !14} // CHECK:STDOUT: !36 = !{!37, !38, !39} @@ -224,7 +224,7 @@ fn Main_method_no_template () { // CHECK:STDOUT: !46 = !DILocation(line: 76, column: 18, scope: !33) // CHECK:STDOUT: !47 = !DILocation(line: 76, column: 3, scope: !33) // CHECK:STDOUT: !48 = !DILocation(line: 70, column: 1, scope: !33) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "third_function", linkageName: "_Cthird_function.Main.1c39a3b349bf66b6", scope: null, file: !3, line: 35, type: !34, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "third_function", linkageName: "_Cthird_function.Main.1c39a3b349bf66b6", scope: null, file: !1, line: 35, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51, !52, !53} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !14) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !49, type: !14) diff --git a/toolchain/lower/testdata/function/generic/type_param.carbon b/toolchain/lower/testdata/function/generic/type_param.carbon index 79c0e2c41967..80f8bd46a8fd 100644 --- a/toolchain/lower/testdata/function/generic/type_param.carbon +++ b/toolchain/lower/testdata/function/generic/type_param.carbon @@ -18,10 +18,10 @@ fn F(T:! type) { // CHECK:STDOUT: ; ModuleID = 'type_param.carbon' // CHECK:STDOUT: source_filename = "type_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "type_param.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "type_param.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 48d0d3c93dc4..74bf7373b54e 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -260,32 +260,32 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "type_representation.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.be1e879c1ad406d8.Core:Copy.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "type_representation.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.be1e879c1ad406d8.Core:Copy.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 24, column: 5, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F_i32", linkageName: "_CF_i32.Main", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F_i32", linkageName: "_CF_i32.Main", scope: null, file: !1, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !14 = !DILocation(line: 29, column: 10, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 29, column: 3, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 29, type: !17, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 29, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null, !7} // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !16, type: !7) // CHECK:STDOUT: !21 = !DILocation(line: 29, column: 10, scope: !16) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !3, line: 37, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !1, line: 37, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{!25, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -295,85 +295,85 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: !29 = !DILocation(line: 38, column: 33, scope: !22) // CHECK:STDOUT: !30 = !DILocation(line: 38, column: 14, scope: !22) // CHECK:STDOUT: !31 = !DILocation(line: 38, column: 7, scope: !22) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !3, line: 43, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !1, line: 43, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !25) // CHECK:STDOUT: !35 = !DILocation(line: 44, column: 10, scope: !32) // CHECK:STDOUT: !36 = !DILocation(line: 44, column: 3, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !3, line: 44, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !1, line: 44, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !38 = !DISubroutineType(types: !39) // CHECK:STDOUT: !39 = !{null, !25} // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !37, type: !25) // CHECK:STDOUT: !42 = !DILocation(line: 44, column: 10, scope: !37) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !3, line: 44, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !1, line: 44, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !25) // CHECK:STDOUT: !46 = !DILocation(line: 44, column: 10, scope: !43) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !3, line: 48, type: !48, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !1, line: 48, type: !48, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !48 = !DISubroutineType(types: !49) // CHECK:STDOUT: !49 = !{null} // CHECK:STDOUT: !50 = !DILocation(line: 49, column: 5, scope: !47) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "F_empty_tuple", linkageName: "_CF_empty_tuple.Main", scope: null, file: !3, line: 53, type: !48, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "F_empty_tuple", linkageName: "_CF_empty_tuple.Main", scope: null, file: !1, line: 53, type: !48, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !52 = !DILocation(line: 54, column: 10, scope: !51) // CHECK:STDOUT: !53 = !DILocation(line: 54, column: 3, scope: !51) -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e554695bf635d9c1:Copy.Main", scope: null, file: !3, line: 58, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !55) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e554695bf635d9c1:Copy.Main", scope: null, file: !1, line: 58, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !55) // CHECK:STDOUT: !55 = !{!56} // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !54, type: !25) // CHECK:STDOUT: !57 = !DILocation(line: 59, column: 12, scope: !54) // CHECK:STDOUT: !58 = !DILocation(line: 59, column: 5, scope: !54) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !3, line: 63, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !1, line: 63, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !60) // CHECK:STDOUT: !60 = !{!61} // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !59, type: !25) // CHECK:STDOUT: !62 = !DILocation(line: 64, column: 10, scope: !59) // CHECK:STDOUT: !63 = !DILocation(line: 64, column: 3, scope: !59) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 64, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !65) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 64, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !65) // CHECK:STDOUT: !65 = !{!66} // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !64, type: !25) // CHECK:STDOUT: !67 = !DILocation(line: 64, column: 10, scope: !64) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ae1e3622d7875d32:Copy.Main", scope: null, file: !3, line: 68, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ae1e3622d7875d32:Copy.Main", scope: null, file: !1, line: 68, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !69) // CHECK:STDOUT: !69 = !{!70} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !68, type: !25) // CHECK:STDOUT: !71 = !DILocation(line: 69, column: 13, scope: !68) // CHECK:STDOUT: !72 = !DILocation(line: 69, column: 12, scope: !68) // CHECK:STDOUT: !73 = !DILocation(line: 69, column: 33, scope: !68) // CHECK:STDOUT: !74 = !DILocation(line: 69, column: 5, scope: !68) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !3, line: 73, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !76) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !1, line: 73, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !76) // CHECK:STDOUT: !76 = !{!77} // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !75, type: !25) // CHECK:STDOUT: !78 = !DILocation(line: 74, column: 10, scope: !75) // CHECK:STDOUT: !79 = !DILocation(line: 74, column: 3, scope: !75) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Op", linkageName: "_COp.48dc0f9faa274ddd:core.Destroy.Core", scope: null, file: !3, line: 74, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !81) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Op", linkageName: "_COp.48dc0f9faa274ddd:core.Destroy.Core", scope: null, file: !1, line: 74, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !81) // CHECK:STDOUT: !81 = !{!82} // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !80, type: !25) // CHECK:STDOUT: !83 = !DILocation(line: 74, column: 10, scope: !80) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.349b91811add80c8", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !85) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.349b91811add80c8", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !85) // CHECK:STDOUT: !85 = !{!86} // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !84, type: !7) // CHECK:STDOUT: !87 = !DILocation(line: 18, column: 3, scope: !84) // CHECK:STDOUT: !88 = !DILocation(line: 18, column: 14, scope: !84) // CHECK:STDOUT: !89 = !DILocation(line: 19, column: 10, scope: !84) // CHECK:STDOUT: !90 = !DILocation(line: 19, column: 3, scope: !84) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.883765f2473e3a79", scope: null, file: !3, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.883765f2473e3a79", scope: null, file: !1, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !92 = !{!93} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !91, type: !25) // CHECK:STDOUT: !94 = !DILocation(line: 18, column: 3, scope: !91) // CHECK:STDOUT: !95 = !DILocation(line: 18, column: 14, scope: !91) // CHECK:STDOUT: !96 = !DILocation(line: 19, column: 10, scope: !91) // CHECK:STDOUT: !97 = !DILocation(line: 19, column: 3, scope: !91) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3a325b0fb5d5a1b", scope: null, file: !3, line: 17, type: !48, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3a325b0fb5d5a1b", scope: null, file: !1, line: 17, type: !48, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !99 = !DILocation(line: 18, column: 3, scope: !98) // CHECK:STDOUT: !100 = !DILocation(line: 18, column: 14, scope: !98) // CHECK:STDOUT: !101 = !DILocation(line: 19, column: 10, scope: !98) // CHECK:STDOUT: !102 = !DILocation(line: 19, column: 3, scope: !98) -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.57a2a7fa41a2abe5", scope: null, file: !3, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !104) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.57a2a7fa41a2abe5", scope: null, file: !1, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !104) // CHECK:STDOUT: !104 = !{!105} // CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !103, type: !25) // CHECK:STDOUT: !106 = !DILocation(line: 18, column: 3, scope: !103) // CHECK:STDOUT: !107 = !DILocation(line: 18, column: 14, scope: !103) // CHECK:STDOUT: !108 = !DILocation(line: 19, column: 10, scope: !103) // CHECK:STDOUT: !109 = !DILocation(line: 19, column: 3, scope: !103) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.7d44c5ea0170e82e", scope: null, file: !3, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !111) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.7d44c5ea0170e82e", scope: null, file: !1, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !111) // CHECK:STDOUT: !111 = !{!112} // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !110, type: !25) // CHECK:STDOUT: !113 = !DILocation(line: 18, column: 3, scope: !110) diff --git a/toolchain/lower/testdata/global/class_obj.carbon b/toolchain/lower/testdata/global/class_obj.carbon index ab7ae925348c..d0768193917d 100644 --- a/toolchain/lower/testdata/global/class_obj.carbon +++ b/toolchain/lower/testdata/global/class_obj.carbon @@ -33,14 +33,14 @@ var a: A = {}; // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "class_obj.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "class_obj.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/global/class_with_fun.carbon b/toolchain/lower/testdata/global/class_with_fun.carbon index 68c19564515e..dd09b45818e8 100644 --- a/toolchain/lower/testdata/global/class_with_fun.carbon +++ b/toolchain/lower/testdata/global/class_with_fun.carbon @@ -44,19 +44,19 @@ var a: A = {}; // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "class_with_fun.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "ret_a", linkageName: "_Cret_a.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "class_with_fun.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "ret_a", linkageName: "_Cret_a.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 15, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 1, scope: !9) diff --git a/toolchain/lower/testdata/global/decl.carbon b/toolchain/lower/testdata/global/decl.carbon index bacfbd22670f..ee8979794660 100644 --- a/toolchain/lower/testdata/global/decl.carbon +++ b/toolchain/lower/testdata/global/decl.carbon @@ -26,14 +26,14 @@ var a: i32; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "decl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "decl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 12, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/global/simple_init.carbon b/toolchain/lower/testdata/global/simple_init.carbon index 48d9bbdb2a14..6e284d5dfe89 100644 --- a/toolchain/lower/testdata/global/simple_init.carbon +++ b/toolchain/lower/testdata/global/simple_init.carbon @@ -26,14 +26,14 @@ var a: i32 = 0; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple_init.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple_init.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 12, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/global/simple_with_fun.carbon b/toolchain/lower/testdata/global/simple_with_fun.carbon index fce9a63639fb..91a3a2de078c 100644 --- a/toolchain/lower/testdata/global/simple_with_fun.carbon +++ b/toolchain/lower/testdata/global/simple_with_fun.carbon @@ -38,19 +38,19 @@ var a: i32 = test_a(); // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple_with_fun.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "test_a", linkageName: "_Ctest_a.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple_with_fun.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "test_a", linkageName: "_Ctest_a.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DILocation(line: 17, column: 14, scope: !9) diff --git a/toolchain/lower/testdata/global/use.carbon b/toolchain/lower/testdata/global/use.carbon index 201fbe9fa5b0..0353102ac7de 100644 --- a/toolchain/lower/testdata/global/use.carbon +++ b/toolchain/lower/testdata/global/use.carbon @@ -42,20 +42,20 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 17, column: 10, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !11, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !11, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null} // CHECK:STDOUT: !13 = !DILocation(line: 12, column: 1, scope: !10) diff --git a/toolchain/lower/testdata/if/else.carbon b/toolchain/lower/testdata/if/else.carbon index c7149e310198..3d9a86566b81 100644 --- a/toolchain/lower/testdata/if/else.carbon +++ b/toolchain/lower/testdata/if/else.carbon @@ -64,22 +64,22 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "else.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "else.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 14, column: 1, scope: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !10) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "If", linkageName: "_CIf.Main", scope: null, file: !3, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "If", linkageName: "_CIf.Main", scope: null, file: !1, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/if/no_else.carbon b/toolchain/lower/testdata/if/no_else.carbon index 12ae6083e7ab..ae7b5c1ab9d0 100644 --- a/toolchain/lower/testdata/if/no_else.carbon +++ b/toolchain/lower/testdata/if/no_else.carbon @@ -51,20 +51,20 @@ fn If(b: bool) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_else.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_else.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 14, column: 1, scope: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "If", linkageName: "_CIf.Main", scope: null, file: !3, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "If", linkageName: "_CIf.Main", scope: null, file: !1, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/if_expr/basic.carbon b/toolchain/lower/testdata/if_expr/basic.carbon index 390cdd28ea87..56da94c22cc6 100644 --- a/toolchain/lower/testdata/if_expr/basic.carbon +++ b/toolchain/lower/testdata/if_expr/basic.carbon @@ -52,21 +52,21 @@ fn Select(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 13, column: 17, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 17, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !3, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/if_expr/empty_block.carbon b/toolchain/lower/testdata/if_expr/empty_block.carbon index fe8227c81017..d4158c5b5cc7 100644 --- a/toolchain/lower/testdata/if_expr/empty_block.carbon +++ b/toolchain/lower/testdata/if_expr/empty_block.carbon @@ -55,14 +55,14 @@ fn Select(b: bool, c: bool, d: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty_block.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty_block.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Select", linkageName: "_CSelect.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8, !8, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/impl/assoc_fn_alias.carbon b/toolchain/lower/testdata/impl/assoc_fn_alias.carbon index 33c359b3aca6..729c2c5b3e15 100644 --- a/toolchain/lower/testdata/impl/assoc_fn_alias.carbon +++ b/toolchain/lower/testdata/impl/assoc_fn_alias.carbon @@ -49,14 +49,14 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "assoc_fn_alias.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assoc_fn_alias.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -65,7 +65,7 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 24, column: 12, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 24, column: 5, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !8) // CHECK:STDOUT: !16 = !DILocation(line: 29, column: 10, scope: !13) diff --git a/toolchain/lower/testdata/impl/extend_impl.carbon b/toolchain/lower/testdata/impl/extend_impl.carbon index 6a35762953ba..58d5628bc486 100644 --- a/toolchain/lower/testdata/impl/extend_impl.carbon +++ b/toolchain/lower/testdata/impl/extend_impl.carbon @@ -55,22 +55,22 @@ fn InstanceAccess(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "extend_impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "extend_impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 20, column: 7, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TypeAccess", linkageName: "_CTypeAccess.Main", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TypeAccess", linkageName: "_CTypeAccess.Main", scope: null, file: !1, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 26, column: 10, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 26, column: 3, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "InstanceAccess", linkageName: "_CInstanceAccess.Main", scope: null, file: !3, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "InstanceAccess", linkageName: "_CInstanceAccess.Main", scope: null, file: !1, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!7, !15} // CHECK:STDOUT: !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/impl/impl.carbon b/toolchain/lower/testdata/impl/impl.carbon index 24ed00dd9ce4..90c453f74ec5 100644 --- a/toolchain/lower/testdata/impl/impl.carbon +++ b/toolchain/lower/testdata/impl/impl.carbon @@ -103,14 +103,14 @@ impl C(B) as I { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -119,7 +119,7 @@ impl C(B) as I { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 14, column: 12, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 14, column: 5, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !8) // CHECK:STDOUT: !16 = !DILocation(line: 19, column: 10, scope: !13) @@ -183,25 +183,25 @@ impl C(B) as I { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_impls.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.bd4fb75a414fe858.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_impls.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.bd4fb75a414fe858.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 13, column: 31, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.a6a60dfee2d7d273.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.a6a60dfee2d7d273.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 31, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F1", linkageName: "_CF1.Main", scope: null, file: !3, line: 20, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F1", linkageName: "_CF1.Main", scope: null, file: !1, line: 20, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !7, !7} // CHECK:STDOUT: !18 = !{!19, !20} @@ -212,13 +212,13 @@ impl C(B) as I { // CHECK:STDOUT: !23 = !DILocation(line: 21, column: 21, scope: !15) // CHECK:STDOUT: !24 = !DILocation(line: 22, column: 21, scope: !15) // CHECK:STDOUT: !25 = !DILocation(line: 20, column: 1, scope: !15) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !7} // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !31 = !DILocation(line: 22, column: 3, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !3, line: 21, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 21, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !35 = !DILocation(line: 21, column: 3, scope: !32) @@ -239,16 +239,16 @@ impl C(B) as I { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_class_impls.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.bd4fb75a414fe858.Main:I.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_class_impls.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.bd4fb75a414fe858.Main:I.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.a6a60dfee2d7d273.Main:I.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.a6a60dfee2d7d273.Main:I.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 18, column: 3, scope: !8) diff --git a/toolchain/lower/testdata/impl/import.carbon b/toolchain/lower/testdata/impl/import.carbon index 29a4266e7d3f..bc58b51a8746 100644 --- a/toolchain/lower/testdata/impl/import.carbon +++ b/toolchain/lower/testdata/impl/import.carbon @@ -49,14 +49,14 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "impl_def.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "impl_def.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main:I.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -79,14 +79,14 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "impl_use.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "impl_use.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/impl/import_facet.carbon b/toolchain/lower/testdata/impl/import_facet.carbon index 7ccb710b57f3..a29ba4d27122 100644 --- a/toolchain/lower/testdata/impl/import_facet.carbon +++ b/toolchain/lower/testdata/impl/import_facet.carbon @@ -55,33 +55,33 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: ; ModuleID = 'a.carbon' // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'c.carbon' // CHECK:STDOUT: source_filename = "c.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "c.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "c.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'd.carbon' // CHECK:STDOUT: source_filename = "d.carbon" // CHECK:STDOUT: @@ -128,14 +128,14 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "d.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "d.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -143,18 +143,18 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.589d3e688fca3583:core.Destroy.Core", scope: null, file: !3, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.589d3e688fca3583:core.Destroy.Core", scope: null, file: !1, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 5, column: 10, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba", scope: null, file: !19, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba", scope: null, file: !19, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !19 = !DIFile(filename: "c.carbon", directory: "") // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 7, column: 7, scope: !18) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.4d89da762a733471", scope: null, file: !24, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.4d89da762a733471", scope: null, file: !24, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !24 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !23, type: !7) diff --git a/toolchain/lower/testdata/impl/import_thunk.carbon b/toolchain/lower/testdata/impl/import_thunk.carbon index f91acb3845d1..b5c9c7cdfb9c 100644 --- a/toolchain/lower/testdata/impl/import_thunk.carbon +++ b/toolchain/lower/testdata/impl/import_thunk.carbon @@ -143,14 +143,14 @@ fn Test(a: A) -> C { // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "thunk.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunk.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -159,37 +159,37 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !10 = !DILocation(line: 9, column: 43, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 9, column: 37, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 30, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 12, column: 43, scope: !13) // CHECK:STDOUT: !17 = !DILocation(line: 12, column: 37, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 12, column: 30, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 34, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 20, column: 28, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 21, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.4b54445be9b10a0e.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.4b54445be9b10a0e.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 20, column: 3, scope: !25) // CHECK:STDOUT: !29 = !DILocation(line: 0, scope: !25) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{null, !33} // CHECK:STDOUT: !33 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !30, type: !33) // CHECK:STDOUT: !36 = !DILocation(line: 20, column: 3, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !3, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !1, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !38 = !DISubroutineType(types: !39) // CHECK:STDOUT: !39 = !{null, !7} // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 20, column: 3, scope: !37) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 20, column: 3, scope: !43) @@ -249,14 +249,14 @@ fn Test(a: A) -> C { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_thunk.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_thunk.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -265,20 +265,20 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 19, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 10, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !3, line: 7, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !1, line: 7, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !7} // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !25 = !DILocation(line: 7, column: 10, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 7, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 7, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !29 = !DILocation(line: 7, column: 10, scope: !26) @@ -343,14 +343,14 @@ fn Test(a: A) -> C { // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -359,25 +359,25 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !10 = !DILocation(line: 9, column: 34, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 9, column: 28, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 21, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.c81631f865470482.Main:X.Main:I.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.c81631f865470482.Main:X.Main:I.Main", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 9, column: 3, scope: !13) // CHECK:STDOUT: !17 = !DILocation(line: 0, scope: !13) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 9, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !3, line: 9, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !1, line: 9, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !7} // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 9, column: 3, scope: !25) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 9, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 9, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !7) // CHECK:STDOUT: !34 = !DILocation(line: 9, column: 3, scope: !31) @@ -437,14 +437,14 @@ fn Test(a: A) -> C { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "call_thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_thunk_for_imported_interface.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -453,20 +453,20 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !10 = !DILocation(line: 8, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 8, column: 18, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 8, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 10, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !7} // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !20, type: !7) // CHECK:STDOUT: !25 = !DILocation(line: 8, column: 10, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !29 = !DILocation(line: 8, column: 10, scope: !26) diff --git a/toolchain/lower/testdata/impl/instance_method.carbon b/toolchain/lower/testdata/impl/instance_method.carbon index a1d16977a67c..625a1b1a4ec5 100644 --- a/toolchain/lower/testdata/impl/instance_method.carbon +++ b/toolchain/lower/testdata/impl/instance_method.carbon @@ -46,21 +46,21 @@ fn Call(a: A*) -> A* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "instance_method.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.A.Main:GetSelf.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "instance_method.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.A.Main:GetSelf.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 22, column: 7, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 27, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !14 = !DILocation(line: 28, column: 10, scope: !11) diff --git a/toolchain/lower/testdata/impl/period_self.carbon b/toolchain/lower/testdata/impl/period_self.carbon index 4d0bbc9ce10c..8dd64d0885d1 100644 --- a/toolchain/lower/testdata/impl/period_self.carbon +++ b/toolchain/lower/testdata/impl/period_self.carbon @@ -44,13 +44,13 @@ fn G(a: A(B)) { // CHECK:STDOUT: ; ModuleID = 'library_with_period_self_in_impl.carbon' // CHECK:STDOUT: source_filename = "library_with_period_self_in_impl.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "library_with_period_self_in_impl.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "library_with_period_self_in_impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'import_period_self_in_impl.carbon' // CHECK:STDOUT: source_filename = "import_period_self_in_impl.carbon" // CHECK:STDOUT: @@ -75,14 +75,14 @@ fn G(a: A(B)) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "import_period_self_in_impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_period_self_in_impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -90,13 +90,13 @@ fn G(a: A(B)) { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 6, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a6a60dfee2d7d273", scope: null, file: !13, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a6a60dfee2d7d273", scope: null, file: !13, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !13 = !DIFile(filename: "library_with_period_self_in_impl.carbon", directory: "") // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !12) // CHECK:STDOUT: !17 = !DILocation(line: 17, column: 1, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.5d7343568c0b5715.Main:As.00d5ad878904f3d1.Core.8c89b09ee520ceaa", scope: null, file: !13, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.5d7343568c0b5715.Main:As.00d5ad878904f3d1.Core.8c89b09ee520ceaa", scope: null, file: !13, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{!7, !7} // CHECK:STDOUT: !21 = !{!22} diff --git a/toolchain/lower/testdata/impl/thunk.carbon b/toolchain/lower/testdata/impl/thunk.carbon index 41af934777c0..096014f775a8 100644 --- a/toolchain/lower/testdata/impl/thunk.carbon +++ b/toolchain/lower/testdata/impl/thunk.carbon @@ -164,14 +164,14 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "thunk.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunk.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -180,41 +180,41 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !10 = !DILocation(line: 9, column: 43, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 9, column: 37, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 30, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 12, column: 43, scope: !13) // CHECK:STDOUT: !17 = !DILocation(line: 12, column: 37, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 12, column: 30, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 34, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 20, column: 28, scope: !19) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 21, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.4b54445be9b10a0e.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.4b54445be9b10a0e.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 20, column: 3, scope: !25) // CHECK:STDOUT: !29 = !DILocation(line: 0, scope: !25) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{null, !33} // CHECK:STDOUT: !33 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !30, type: !33) // CHECK:STDOUT: !36 = !DILocation(line: 20, column: 3, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !3, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.464513ac92508f77:core.Destroy.Core", scope: null, file: !1, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !38 = !DISubroutineType(types: !39) // CHECK:STDOUT: !39 = !{null, !7} // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 20, column: 3, scope: !37) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 20, type: !38, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocation(line: 20, column: 3, scope: !43) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !48) // CHECK:STDOUT: !48 = !{!49} // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !7) // CHECK:STDOUT: !50 = !DILocation(line: 24, column: 10, scope: !47) @@ -311,31 +311,31 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_thunk.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_thunk.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 36, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !3, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !3, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 0, scope: !17) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 21, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 21, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{!7, !7, !7} // CHECK:STDOUT: !24 = !{!25, !26} @@ -344,24 +344,24 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !27 = !DILocation(line: 22, column: 10, scope: !21) // CHECK:STDOUT: !28 = !DILocation(line: 22, column: 22, scope: !21) // CHECK:STDOUT: !29 = !DILocation(line: 22, column: 3, scope: !21) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !3, line: 29, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !1, line: 29, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32, !33} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !7) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !30, type: !7) // CHECK:STDOUT: !34 = !DILocation(line: 30, column: 10, scope: !30) // CHECK:STDOUT: !35 = !DILocation(line: 30, column: 3, scope: !30) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !3, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !37) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !1, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !37 = !{!38, !39} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !36, type: !7) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 2, scope: !36, type: !7) // CHECK:STDOUT: !40 = !DILocation(line: 18, column: 34, scope: !36) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.311465f47f92d67a", scope: null, file: !3, line: 25, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.311465f47f92d67a", scope: null, file: !1, line: 25, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43, !44} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !7) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 2, scope: !41, type: !7) // CHECK:STDOUT: !45 = !DILocation(line: 26, column: 10, scope: !41) // CHECK:STDOUT: !46 = !DILocation(line: 26, column: 3, scope: !41) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.eb750e4e5cfbbe32.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !3, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.eb750e4e5cfbbe32.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !1, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !48) // CHECK:STDOUT: !48 = !{!49, !50} // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !47, type: !7) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 2, scope: !47, type: !7) diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index 8667bf964726..1ad6c00332c9 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -119,23 +119,23 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "array_element_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "array_element_access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 12, column: 31, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 12, column: 24, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 14, column: 34, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 14, column: 27, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 16, type: !14, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 16, type: !14, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -148,19 +148,19 @@ fn Run() { // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 18, scope: !13) // CHECK:STDOUT: !24 = !DILocation(line: 19, column: 16, scope: !13) // CHECK:STDOUT: !25 = !DILocation(line: 16, column: 1, scope: !13) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !16} // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !26, type: !16) // CHECK:STDOUT: !31 = !DILocation(line: 20, column: 16, scope: !26) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a830cda2fcf179ac:core.Destroy.Core", scope: null, file: !3, line: 20, type: !33, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a830cda2fcf179ac:core.Destroy.Core", scope: null, file: !1, line: 20, type: !33, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !33 = !DISubroutineType(types: !34) // CHECK:STDOUT: !34 = !{null, !7} // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !37 = !DILocation(line: 20, column: 16, scope: !32) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !41 = !DILocation(line: 17, column: 26, scope: !38) diff --git a/toolchain/lower/testdata/interface/assoc.carbon b/toolchain/lower/testdata/interface/assoc.carbon index 3b23e2bfcbd0..f04344f67e1a 100644 --- a/toolchain/lower/testdata/interface/assoc.carbon +++ b/toolchain/lower/testdata/interface/assoc.carbon @@ -27,14 +27,14 @@ fn F() { I.Assoc; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "assoc.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assoc.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 17, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/interface/basic.carbon b/toolchain/lower/testdata/interface/basic.carbon index 61795de0a2bb..fdd67490cfda 100644 --- a/toolchain/lower/testdata/interface/basic.carbon +++ b/toolchain/lower/testdata/interface/basic.carbon @@ -42,21 +42,21 @@ fn H() -> I { return G(); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 19, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !3, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7} // CHECK:STDOUT: !14 = !DILocation(line: 23, column: 22, scope: !11) diff --git a/toolchain/lower/testdata/interface/mangle_declared_class.carbon b/toolchain/lower/testdata/interface/mangle_declared_class.carbon index 38cae9869b3a..9781e41009be 100644 --- a/toolchain/lower/testdata/interface/mangle_declared_class.carbon +++ b/toolchain/lower/testdata/interface/mangle_declared_class.carbon @@ -43,16 +43,16 @@ impl D as N { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "mangle_declared_class.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "mangle_declared_class.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 18, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.D.Main:I.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.D.Main:I.Main", scope: null, file: !1, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 26, column: 3, scope: !8) diff --git a/toolchain/lower/testdata/interface/where.carbon b/toolchain/lower/testdata/interface/where.carbon index 7d1c940533bb..20773f70e2e6 100644 --- a/toolchain/lower/testdata/interface/where.carbon +++ b/toolchain/lower/testdata/interface/where.carbon @@ -66,14 +66,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.Main", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 12, column: 3, scope: !4) @@ -101,14 +101,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_period_self_dependence.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_period_self_dependence.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -116,11 +116,11 @@ fn G() { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 20, column: 3, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 19, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 23, column: 1, scope: !12) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.5d7343568c0b5715.Main.776dc56337046b6c", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.5d7343568c0b5715.Main.776dc56337046b6c", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !16, type: !7) // CHECK:STDOUT: !19 = !DILocation(line: 16, column: 3, scope: !16) diff --git a/toolchain/lower/testdata/interop/cpp/array.carbon b/toolchain/lower/testdata/interop/cpp/array.carbon index 23fd046d3fce..e0c62cb1c236 100644 --- a/toolchain/lower/testdata/interop/cpp/array.carbon +++ b/toolchain/lower/testdata/interop/cpp/array.carbon @@ -98,17 +98,17 @@ int H() { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "array_value_param.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "array_value_param.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -120,7 +120,7 @@ int H() { // CHECK:STDOUT: !15 = !{i64 4} // CHECK:STDOUT: !16 = !{i64 0, i64 20, !17} // CHECK:STDOUT: !17 = !{!9, !9, i64 0} -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 5, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !23) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{!21, !22} // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -129,7 +129,7 @@ int H() { // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !18, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 5, column: 40, scope: !18) // CHECK:STDOUT: !26 = !DILocation(line: 5, column: 33, scope: !18) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !6, line: 5, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !1, line: 5, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !22, !21} // CHECK:STDOUT: !30 = !{!31, !32} diff --git a/toolchain/lower/testdata/interop/cpp/clang_code_generator_callbacks.carbon b/toolchain/lower/testdata/interop/cpp/clang_code_generator_callbacks.carbon index 7d36544d4820..24f15fab4474 100644 --- a/toolchain/lower/testdata/interop/cpp/clang_code_generator_callbacks.carbon +++ b/toolchain/lower/testdata/interop/cpp/clang_code_generator_callbacks.carbon @@ -122,17 +122,17 @@ void f2() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "clang_code_generator_callbacks.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "clang_code_generator_callbacks.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} diff --git a/toolchain/lower/testdata/interop/cpp/class/export/class.carbon b/toolchain/lower/testdata/interop/cpp/class/export/class.carbon index af60f05668dc..a6d869cfca07 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/class.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/class.carbon @@ -125,17 +125,17 @@ fn G() { // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pointer.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "pointer.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -143,7 +143,7 @@ fn G() { // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTSN6Carbon1AE", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "DoIt", linkageName: "_CDoIt.Main", scope: null, file: !6, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "DoIt", linkageName: "_CDoIt.Main", scope: null, file: !1, line: 15, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 13, scope: !14) @@ -366,17 +366,17 @@ fn G() { // CHECK:STDOUT: attributes #4 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #5 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "layout.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "layout.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -388,61 +388,61 @@ fn G() { // CHECK:STDOUT: !15 = !{!"p1 _ZTSN6Carbon1BE", !13, i64 0} // CHECK:STDOUT: !16 = !{!17, !17, i64 0} // CHECK:STDOUT: !17 = !{!"p1 _ZTSN6Carbon1CE", !13, i64 0} -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !6, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !1, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 6, column: 1, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 6, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !28} // CHECK:STDOUT: !28 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28) // CHECK:STDOUT: !31 = !DILocation(line: 6, column: 1, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b0e8b846ec8794f3:core.Destroy.Core", scope: null, file: !6, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b0e8b846ec8794f3:core.Destroy.Core", scope: null, file: !1, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !21) // CHECK:STDOUT: !35 = !DILocation(line: 6, column: 1, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !6, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !37 = !{!38} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !36, type: !21) // CHECK:STDOUT: !39 = !DILocation(line: 6, column: 1, scope: !36) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CallA__carbon_thunk", linkageName: "_CCallA__carbon_thunk.Main", scope: null, file: !6, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CallA__carbon_thunk", linkageName: "_CCallA__carbon_thunk.Main", scope: null, file: !1, line: 21, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !21) // CHECK:STDOUT: !43 = !DILocation(line: 21, column: 1, scope: !40) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !6, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !1, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !21) // CHECK:STDOUT: !47 = !DILocation(line: 11, column: 1, scope: !44) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.470dcacdfb83e588:core.Destroy.Core", scope: null, file: !6, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.470dcacdfb83e588:core.Destroy.Core", scope: null, file: !1, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !49 = !{!50} // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !48, type: !21) // CHECK:STDOUT: !51 = !DILocation(line: 11, column: 1, scope: !48) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !6, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6c3865e9cbd9f6de:core.Destroy.Core", scope: null, file: !1, line: 11, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 11, column: 1, scope: !52) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "CallB__carbon_thunk", linkageName: "_CCallB__carbon_thunk.Main", scope: null, file: !6, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "CallB__carbon_thunk", linkageName: "_CCallB__carbon_thunk.Main", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !57) // CHECK:STDOUT: !57 = !{!58} // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !56, type: !21) // CHECK:STDOUT: !59 = !DILocation(line: 22, column: 1, scope: !56) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !6, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !1, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !61 = !{!62} // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !60, type: !21) // CHECK:STDOUT: !63 = !DILocation(line: 16, column: 1, scope: !60) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.67ca81f926811f5a:core.Destroy.Core", scope: null, file: !6, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.67ca81f926811f5a:core.Destroy.Core", scope: null, file: !1, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !65) // CHECK:STDOUT: !65 = !{!66} // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !64, type: !21) // CHECK:STDOUT: !67 = !DILocation(line: 16, column: 1, scope: !64) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !6, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 16, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !69) // CHECK:STDOUT: !69 = !{!70} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !68, type: !21) // CHECK:STDOUT: !71 = !DILocation(line: 16, column: 1, scope: !68) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "CallC__carbon_thunk", linkageName: "_CCallC__carbon_thunk.Main", scope: null, file: !6, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "CallC__carbon_thunk", linkageName: "_CCallC__carbon_thunk.Main", scope: null, file: !1, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !73) // CHECK:STDOUT: !73 = !{!74} // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !21) // CHECK:STDOUT: !75 = !DILocation(line: 23, column: 1, scope: !72) @@ -518,17 +518,17 @@ fn G() { // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "field.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "field.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -541,29 +541,29 @@ fn G() { // CHECK:STDOUT: !16 = !{!17, !8, i64 0} // CHECK:STDOUT: !17 = !{!"_ZTSN6Carbon1CE", !8, i64 0, !8, i64 4} // CHECK:STDOUT: !18 = !{!17, !8, i64 4} -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !6, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !1, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 6, column: 1, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 6, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !29} // CHECK:STDOUT: !29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !26, type: !29) // CHECK:STDOUT: !32 = !DILocation(line: 6, column: 1, scope: !26) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !6, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !1, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !22) // CHECK:STDOUT: !36 = !DILocation(line: 6, column: 1, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !6, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 6, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !22) // CHECK:STDOUT: !40 = !DILocation(line: 6, column: 1, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !6, line: 18, type: !42, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 18, type: !42, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !42 = !DISubroutineType(types: !43) // CHECK:STDOUT: !43 = !{null} // CHECK:STDOUT: !44 = !DILocation(line: 19, column: 3, scope: !41) diff --git a/toolchain/lower/testdata/interop/cpp/class/export/mangle.carbon b/toolchain/lower/testdata/interop/cpp/class/export/mangle.carbon index 70020791bf2d..8d5a8a473f68 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/mangle.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/mangle.carbon @@ -29,13 +29,13 @@ void f1(Carbon::Other::Class1*) { // CHECK:STDOUT: ; ModuleID = 'other.carbon' // CHECK:STDOUT: source_filename = "other.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "other.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "other.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'namespace.carbon' // CHECK:STDOUT: source_filename = "namespace.carbon" // CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" @@ -51,17 +51,17 @@ void f1(Carbon::Other::Class1*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "namespace.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "namespace.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} diff --git a/toolchain/lower/testdata/interop/cpp/class/export/method.carbon b/toolchain/lower/testdata/interop/cpp/class/export/method.carbon index ea2e68b85a66..c4ae427faa7e 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/method.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/method.carbon @@ -142,17 +142,17 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: attributes #4 = { nounwind } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "method.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "method.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -160,22 +160,22 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTSN6Carbon1AE", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !6, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !1, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 6, column: 3, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !6, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !1, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !21, type: !17) // CHECK:STDOUT: !24 = !DILocation(line: 5, column: 1, scope: !21) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !6, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !17) // CHECK:STDOUT: !28 = !DILocation(line: 5, column: 1, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !6, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !1, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !17) // CHECK:STDOUT: !32 = !DILocation(line: 6, column: 3, scope: !29) @@ -271,17 +271,17 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: attributes #4 = { nounwind } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "method_with_args_and_return.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "method_with_args_and_return.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -289,7 +289,7 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTSN6Carbon1AE", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !6, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !1, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{!17, !18, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -298,17 +298,17 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !14, type: !18) // CHECK:STDOUT: !21 = !DILocalVariable(arg: 2, scope: !14, type: !17) // CHECK:STDOUT: !22 = !DILocation(line: 8, column: 5, scope: !14) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !6, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !1, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !18} // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !23, type: !18) // CHECK:STDOUT: !28 = !DILocation(line: 5, column: 1, scope: !23) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !6, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !18) // CHECK:STDOUT: !32 = !DILocation(line: 5, column: 1, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !6, line: 6, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !1, line: 6, type: !34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !34 = !DISubroutineType(types: !35) // CHECK:STDOUT: !35 = !{null, !18, !17, !17} // CHECK:STDOUT: !36 = !{!37, !38, !39} @@ -316,7 +316,7 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !33, type: !17) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 3, scope: !33, type: !17) // CHECK:STDOUT: !40 = !DILocation(line: 6, column: 3, scope: !33) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !6, line: 18, type: !42, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !1, line: 18, type: !42, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !42 = !DISubroutineType(types: !43) // CHECK:STDOUT: !43 = !{!17} // CHECK:STDOUT: !44 = !DILocation(line: 18, column: 32, scope: !41) @@ -378,38 +378,38 @@ fn CallCallF() { Cpp.CallF(); } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "static.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "static.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.A.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 3, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !6, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !1, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 5, column: 1, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !6, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !18) // CHECK:STDOUT: !25 = !DILocation(line: 5, column: 1, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !27 = !DILocation(line: 6, column: 3, scope: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !29 = !DILocation(line: 15, column: 18, scope: !28) // CHECK:STDOUT: !30 = !DILocation(line: 15, column: 1, scope: !28) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon index 030b11321455..a5ca42e70ab2 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon @@ -181,22 +181,22 @@ fn Packed(n: i32) { // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "alignment.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "alignment.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "NaturallyAligned", linkageName: "_CNaturallyAligned.Main", scope: null, file: !6, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "NaturallyAligned", linkageName: "_CNaturallyAligned.Main", scope: null, file: !1, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -209,12 +209,12 @@ fn Packed(n: i32) { // CHECK:STDOUT: !21 = !{!22, !22, i64 0} // CHECK:STDOUT: !22 = !{!"p1 _ZTS16NaturallyAligned", !23, i64 0} // CHECK:STDOUT: !23 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp", scope: null, file: !6, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp", scope: null, file: !1, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !28 = !DILocation(line: 7, column: 8, scope: !24) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !6, line: 29, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !1, line: 29, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !14) // CHECK:STDOUT: !32 = !DILocation(line: 30, column: 3, scope: !29) @@ -223,9 +223,9 @@ fn Packed(n: i32) { // CHECK:STDOUT: !35 = !DILocation(line: 29, column: 1, scope: !29) // CHECK:STDOUT: !36 = !{!37, !37, i64 0} // CHECK:STDOUT: !37 = !{!"p1 _ZTS14ExtraAlignment", !23, i64 0} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !6, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !1, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !39 = !DILocation(line: 11, column: 20, scope: !38) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !6, line: 37, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !1, line: 37, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14) // CHECK:STDOUT: !43 = !DILocation(line: 38, column: 3, scope: !40) @@ -234,15 +234,15 @@ fn Packed(n: i32) { // CHECK:STDOUT: !46 = !DILocation(line: 37, column: 1, scope: !40) // CHECK:STDOUT: !47 = !{!48, !48, i64 0} // CHECK:STDOUT: !48 = !{!"p1 _ZTS6Packed", !23, i64 0} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !6, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !1, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !50 = !DILocation(line: 15, column: 32, scope: !49) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !52 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !53 = !DILocation(line: 9, column: 28, scope: !51) // CHECK:STDOUT: !54 = !DILocation(line: 9, column: 21, scope: !51) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !56 = !DILocation(line: 9, column: 28, scope: !55) // CHECK:STDOUT: !57 = !DILocation(line: 9, column: 21, scope: !55) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !52, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !59 = !DILocation(line: 9, column: 28, scope: !58) // CHECK:STDOUT: !60 = !DILocation(line: 9, column: 21, scope: !58) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/base.carbon b/toolchain/lower/testdata/interop/cpp/class/import/base.carbon index d26cedce5643..255ed7702ec5 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/base.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/base.carbon @@ -82,29 +82,29 @@ fn Call(b: Cpp.B*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertPtr", linkageName: "_CConvertPtr.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertPtr", linkageName: "_CConvertPtr.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "ConvertVal", linkageName: "_CConvertVal.Main", scope: null, file: !6, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "ConvertVal", linkageName: "_CConvertVal.Main", scope: null, file: !1, line: 12, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !14} // CHECK:STDOUT: !21 = !{!22} @@ -128,22 +128,22 @@ fn Call(b: Cpp.B*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "access_field.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "access_field.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessVal", linkageName: "_CAccessVal.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessVal", linkageName: "_CAccessVal.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -179,22 +179,22 @@ fn Call(b: Cpp.B*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_method.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_method.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon b/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon index 3c2afc9b3fce..708d9c7db476 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon @@ -238,22 +238,22 @@ fn Four() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_default.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_default.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 18, scope: !11) @@ -261,7 +261,7 @@ fn Four() { // CHECK:STDOUT: !16 = !{!17, !17, i64 0} // CHECK:STDOUT: !17 = !{!"p1 _ZTS1C", !18, i64 0} // CHECK:STDOUT: !18 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 11, column: 18, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 10, column: 1, scope: !19) // CHECK:STDOUT: !22 = !{!23, !8, i64 0} @@ -330,22 +330,22 @@ fn Four() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "implicit_default.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "implicit_default.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -353,13 +353,13 @@ fn Four() { // CHECK:STDOUT: !16 = !{!17, !17, i64 0} // CHECK:STDOUT: !17 = !{!"p1 _ZTS1C", !18, i64 0} // CHECK:STDOUT: !18 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !20, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !20, line: 4, type: !21, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DIFile(filename: "./default.h", directory: "") // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !DILocation(line: 4, column: 3, scope: !19) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !26, line: 9, type: !21, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !26, line: 9, type: !21, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !27 = !DILocation(line: 9, column: 28, scope: !25) // CHECK:STDOUT: !28 = !DILocation(line: 9, column: 21, scope: !25) @@ -477,22 +477,22 @@ fn Four() { // CHECK:STDOUT: attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "defaulted_default.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "defaulted_default.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 8, column: 7, scope: !11) @@ -503,7 +503,7 @@ fn Four() { // CHECK:STDOUT: !19 = !{!20, !20, i64 0} // CHECK:STDOUT: !20 = !{!"p1 _ZTS26ImplicitlyDefaultedDefault", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 2, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 2, type: !24, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DIFile(filename: "./defaulted_default.h", directory: "") // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{!26} @@ -511,13 +511,13 @@ fn Four() { // CHECK:STDOUT: !27 = !DILocation(line: 2, column: 8, scope: !22) // CHECK:STDOUT: !28 = !{!29, !29, i64 0} // CHECK:STDOUT: !29 = !{!"p1 _ZTS26ExplicitlyDefaultedDefault", !21, i64 0} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp", scope: null, file: !23, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !31 = !DILocation(line: 7, column: 3, scope: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9", scope: null, file: !33, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9", scope: null, file: !33, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !33 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !34 = !DILocation(line: 9, column: 28, scope: !32) // CHECK:STDOUT: !35 = !DILocation(line: 9, column: 21, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271", scope: null, file: !33, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271", scope: null, file: !33, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !37 = !DILocation(line: 9, column: 28, scope: !36) // CHECK:STDOUT: !38 = !DILocation(line: 9, column: 21, scope: !36) // CHECK:STDOUT: !39 = !{!40, !8, i64 0} @@ -569,22 +569,22 @@ fn Four() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_copy.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_copy.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -595,7 +595,7 @@ fn Four() { // CHECK:STDOUT: !19 = !{!20, !20, i64 0} // CHECK:STDOUT: !20 = !{!"p1 _ZTS4Copy", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp", scope: null, file: !23, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp", scope: null, file: !23, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !23 = !DIFile(filename: "./copy.h", directory: "") // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !22, type: !14) @@ -668,22 +668,22 @@ fn Four() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_c1_in_thunk.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_c1_in_thunk.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 24, scope: !11) @@ -991,22 +991,22 @@ fn Four() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_multi_argument.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_multi_argument.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Zero", linkageName: "_CZero.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Zero", linkageName: "_CZero.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 18, scope: !11) @@ -1015,20 +1015,20 @@ fn Four() { // CHECK:STDOUT: !17 = !{!18, !18, i64 0} // CHECK:STDOUT: !18 = !{!"p1 _ZTS1C", !19, i64 0} // CHECK:STDOUT: !19 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "One", linkageName: "_COne.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "One", linkageName: "_COne.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !21 = !DILocation(line: 12, column: 18, scope: !20) // CHECK:STDOUT: !22 = !DILocation(line: 13, column: 18, scope: !20) // CHECK:STDOUT: !23 = !DILocation(line: 14, column: 18, scope: !20) // CHECK:STDOUT: !24 = !DILocation(line: 11, column: 1, scope: !20) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Two", linkageName: "_CTwo.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Two", linkageName: "_CTwo.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DILocation(line: 18, column: 18, scope: !25) // CHECK:STDOUT: !27 = !DILocation(line: 19, column: 18, scope: !25) // CHECK:STDOUT: !28 = !DILocation(line: 17, column: 1, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Three", linkageName: "_CThree.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Three", linkageName: "_CThree.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DILocation(line: 23, column: 18, scope: !29) // CHECK:STDOUT: !31 = !DILocation(line: 24, column: 18, scope: !29) // CHECK:STDOUT: !32 = !DILocation(line: 22, column: 1, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Four", linkageName: "_CFour.Main", scope: null, file: !6, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Four", linkageName: "_CFour.Main", scope: null, file: !1, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !34 = !DILocation(line: 28, column: 18, scope: !33) // CHECK:STDOUT: !35 = !DILocation(line: 29, column: 18, scope: !33) // CHECK:STDOUT: !36 = !DILocation(line: 27, column: 1, scope: !33) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon b/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon index 03b2a87fcebd..e3b41d856339 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon @@ -133,22 +133,22 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "class_to_class.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "class_to_class.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -162,7 +162,7 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: !22 = !{!23, !23, i64 0} // CHECK:STDOUT: !23 = !{!"p1 _ZTS1A", !21, i64 0} // CHECK:STDOUT: !24 = !{} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !6, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !1, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !14) // CHECK:STDOUT: !28 = !DILocation(line: 20, column: 25, scope: !25) @@ -241,22 +241,22 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "class_to_enum.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "class_to_enum.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -274,7 +274,7 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: !26 = !{!"_ZTS1S", !9, i64 0} // CHECK:STDOUT: !27 = !{!28, !28, i64 0} // CHECK:STDOUT: !28 = !{!"_ZTS1I", !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !6, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !1, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !14) // CHECK:STDOUT: !32 = !DILocation(line: 20, column: 25, scope: !29) @@ -329,22 +329,22 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "class_to_int.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "class_to_int.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -356,14 +356,14 @@ fn ConvertToValue(b: Cpp.B) { // CHECK:STDOUT: !20 = !{!"p1 _ZTS1B", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} // CHECK:STDOUT: !22 = !{} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 12, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 12, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !26} // CHECK:STDOUT: !26 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !26) // CHECK:STDOUT: !29 = !DILocation(line: 12, column: 3, scope: !23) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !14) // CHECK:STDOUT: !33 = !DILocation(line: 16, column: 27, scope: !30) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon b/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon index 5866e8ee2092..524721a731ac 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon @@ -198,17 +198,17 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "copyable.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "copyable.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -216,16 +216,16 @@ fn PassTemporary() { // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTS8Copyable", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !6, line: 16, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !1, line: 16, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DILocation(line: 17, column: 3, scope: !14) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 1, scope: !14) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !6, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !1, line: 20, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 21, column: 12, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 21, column: 3, scope: !19) // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 1, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !6, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !1, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !26} // CHECK:STDOUT: !26 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -233,12 +233,12 @@ fn PassTemporary() { // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !26) // CHECK:STDOUT: !29 = !DILocation(line: 25, column: 3, scope: !23) // CHECK:STDOUT: !30 = !DILocation(line: 24, column: 1, scope: !23) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !6, line: 28, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !1, line: 28, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !26) // CHECK:STDOUT: !34 = !DILocation(line: 29, column: 3, scope: !31) // CHECK:STDOUT: !35 = !DILocation(line: 28, column: 1, scope: !31) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !37 = !DILocation(line: 14, column: 23, scope: !36) // CHECK:STDOUT: !38 = !DILocation(line: 0, scope: !36) // CHECK:STDOUT: ; ModuleID = 'copy_or_move.carbon' @@ -350,17 +350,17 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "copy_or_move.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "copy_or_move.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -368,17 +368,17 @@ fn PassTemporary() { // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTS10CopyOrMove", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !6, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !1, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 3, scope: !14) // CHECK:STDOUT: !18 = !DILocation(line: 18, column: 1, scope: !14) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !6, line: 22, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !1, line: 22, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 13, column: 21, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 23, column: 12, scope: !19) // CHECK:STDOUT: !22 = !DILocation(line: 23, column: 3, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 22, column: 1, scope: !19) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !6, line: 26, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !1, line: 26, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{null, !27} // CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -386,12 +386,12 @@ fn PassTemporary() { // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !24, type: !27) // CHECK:STDOUT: !30 = !DILocation(line: 27, column: 3, scope: !24) // CHECK:STDOUT: !31 = !DILocation(line: 26, column: 1, scope: !24) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !6, line: 30, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !1, line: 30, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !27) // CHECK:STDOUT: !35 = !DILocation(line: 31, column: 3, scope: !32) // CHECK:STDOUT: !36 = !DILocation(line: 30, column: 1, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 25, scope: !37) // CHECK:STDOUT: !39 = !DILocation(line: 0, scope: !37) // CHECK:STDOUT: ; ModuleID = 'move_only.carbon' @@ -472,17 +472,17 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "move_only.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "move_only.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -490,15 +490,15 @@ fn PassTemporary() { // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 _ZTS8MoveOnly", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobalByMove", linkageName: "_CPassGlobalByMove.Main", scope: null, file: !6, line: 22, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "PassGlobalByMove", linkageName: "_CPassGlobalByMove.Main", scope: null, file: !1, line: 22, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DILocation(line: 22, column: 1, scope: !14) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !6, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !1, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !19 = !DILocation(line: 17, column: 19, scope: !18) // CHECK:STDOUT: !20 = !DILocation(line: 28, column: 12, scope: !18) // CHECK:STDOUT: !21 = !DILocation(line: 28, column: 3, scope: !18) // CHECK:STDOUT: !22 = !DILocation(line: 27, column: 1, scope: !18) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !24 = !DILocation(line: 20, column: 23, scope: !23) // CHECK:STDOUT: !25 = !DILocation(line: 0, scope: !23) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon index d1ba6a0f8219..9e11519bba01 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon @@ -264,17 +264,17 @@ auto DoThing() -> void { // CHECK:STDOUT: attributes #7 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: attributes #8 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "dynamic_base_from_cpp.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "dynamic_base_from_cpp.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -286,38 +286,38 @@ auto DoThing() -> void { // CHECK:STDOUT: !15 = !{!"p1 _ZTSN6Carbon7DerivedE", !13, i64 0} // CHECK:STDOUT: !16 = !{!17, !17, i64 0} // CHECK:STDOUT: !17 = !{!"vtable pointer", !10, i64 0} -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "other_func", linkageName: "_Cother_func.Derived.Main", scope: null, file: !6, line: 24, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "other_func", linkageName: "_Cother_func.Derived.Main", scope: null, file: !1, line: 24, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 24, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc.Derived.Main", scope: null, file: !6, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc.Derived.Main", scope: null, file: !1, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 26, column: 3, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc:thunk:Base.Cpp:Derived.Main", scope: null, file: !6, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "func", linkageName: "_Cfunc:thunk:Base.Cpp:Derived.Main", scope: null, file: !1, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !21) // CHECK:STDOUT: !32 = !DILocation(line: 26, column: 3, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Derived.Main", scope: null, file: !6, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Derived.Main", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !21) // CHECK:STDOUT: !36 = !DILocation(line: 22, column: 1, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.13b019890e86b6be:core.Destroy.Core", scope: null, file: !6, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.13b019890e86b6be:core.Destroy.Core", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !21) // CHECK:STDOUT: !40 = !DILocation(line: 22, column: 1, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !6, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8185e3504351afa8:core.Destroy.Core", scope: null, file: !1, line: 22, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !21) // CHECK:STDOUT: !44 = !DILocation(line: 22, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !6, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !1, line: 26, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !21) // CHECK:STDOUT: !48 = !DILocation(line: 26, column: 3, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !6, line: 24, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !1, line: 24, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !21) // CHECK:STDOUT: !52 = !DILocation(line: 24, column: 3, scope: !49) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/field.carbon b/toolchain/lower/testdata/interop/cpp/class/import/field.carbon index d6d1249161df..68a12411b1d0 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/field.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/field.carbon @@ -131,22 +131,22 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "access_struct.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "access_struct.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -155,7 +155,7 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !11, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 9, column: 10, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 9, column: 3, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessM", linkageName: "_CAccessM.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessM", linkageName: "_CAccessM.Main", scope: null, file: !1, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !15) // CHECK:STDOUT: !23 = !DILocation(line: 13, column: 10, scope: !20) @@ -183,22 +183,22 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assign_struct.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "assign_struct.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AssignN", linkageName: "_CAssignN.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AssignN", linkageName: "_CAssignN.Main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -206,7 +206,7 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 9, column: 3, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 8, column: 1, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "AssignM", linkageName: "_CAssignM.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "AssignM", linkageName: "_CAssignM.Main", scope: null, file: !1, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !14) // CHECK:STDOUT: !22 = !DILocation(line: 13, column: 3, scope: !19) @@ -234,22 +234,22 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "access_union.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "access_union.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -258,7 +258,7 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !11, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessM", linkageName: "_CAccessM.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessM", linkageName: "_CAccessM.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !15) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 10, scope: !20) @@ -286,22 +286,22 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assign_union.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "assign_union.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AssignN", linkageName: "_CAssignN.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AssignN", linkageName: "_CAssignN.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -309,7 +309,7 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 6, column: 1, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "AssignM", linkageName: "_CAssignM.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "AssignM", linkageName: "_CAssignM.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !14) // CHECK:STDOUT: !22 = !DILocation(line: 11, column: 3, scope: !19) @@ -338,22 +338,22 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "access_anon_union.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "access_anon_union.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "AccessN", linkageName: "_CAccessN.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -362,7 +362,7 @@ fn AccessP(a: Cpp.A) -> i32 { // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !11, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessP", linkageName: "_CAccessP.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessP", linkageName: "_CAccessP.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !15) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 11, scope: !20) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/method.carbon b/toolchain/lower/testdata/interop/cpp/class/import/method.carbon index d0b3b6ed875a..f4d97d334c8a 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/method.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/method.carbon @@ -135,22 +135,22 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_by_val.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_by_val.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -203,22 +203,22 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_by_ref.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_by_ref.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !15} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -260,22 +260,22 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_virtual.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_virtual.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "UseVal", linkageName: "_CUseVal.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -358,22 +358,22 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_thunk.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_thunk.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -391,7 +391,7 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: !26 = !{!"p1 omnipotent char", !24, i64 0} // CHECK:STDOUT: !27 = !{} // CHECK:STDOUT: !28 = !{!9, !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !6, line: 8, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !1, line: 8, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{null, !32} // CHECK:STDOUT: !32 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) @@ -415,22 +415,22 @@ fn F(ref r: Cpp.A) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_with_ref_self.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_with_ref_self.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon b/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon index 18ac2616a3a7..35fc4c2d6d9d 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon @@ -174,22 +174,22 @@ fn AccessD(d: Cpp.D) -> i32 { // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_diamond.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "use_diamond.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 3, scope: !11) @@ -198,7 +198,7 @@ fn AccessD(d: Cpp.D) -> i32 { // CHECK:STDOUT: !17 = !{!18, !18, i64 0} // CHECK:STDOUT: !18 = !{!"p1 _ZTS1D", !19, i64 0} // CHECK:STDOUT: !19 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessD", linkageName: "_CAccessD.Main", scope: null, file: !6, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "AccessD", linkageName: "_CAccessD.Main", scope: null, file: !1, line: 14, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!23, !24} // CHECK:STDOUT: !23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon b/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon index 1012ae86e484..0e27ab9a2b0e 100644 --- a/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon @@ -352,17 +352,17 @@ void delete_new_Base() { // CHECK:STDOUT: attributes #10 = { builtin allocsize(0) } // CHECK:STDOUT: attributes #11 = { builtin nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "override_virtual_dtor.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "override_virtual_dtor.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -378,42 +378,42 @@ void delete_new_Base() { // CHECK:STDOUT: !19 = !{!"p1 _ZTS1A", !13, i64 0} // CHECK:STDOUT: !20 = !{} // CHECK:STDOUT: !21 = !{i64 8} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Final.Main", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Final.Main", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !22, type: !25) // CHECK:STDOUT: !28 = !DILocation(line: 14, column: 3, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Base.Main", scope: null, file: !6, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Base.Main", scope: null, file: !1, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !25) // CHECK:STDOUT: !32 = !DILocation(line: 19, column: 3, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Final.Main", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Final.Main", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !25) // CHECK:STDOUT: !36 = !DILocation(line: 12, column: 1, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4fc2347fc019a955:core.Destroy.Core", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4fc2347fc019a955:core.Destroy.Core", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !25) // CHECK:STDOUT: !40 = !DILocation(line: 12, column: 1, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6622c02ec7a967c3:core.Destroy.Core", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6622c02ec7a967c3:core.Destroy.Core", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !25) // CHECK:STDOUT: !44 = !DILocation(line: 12, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Final.Main", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Final.Main", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !25) // CHECK:STDOUT: !48 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Base.Main", scope: null, file: !6, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Base.Main", scope: null, file: !1, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !25) // CHECK:STDOUT: !52 = !DILocation(line: 17, column: 1, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !6, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a45b619846c20518:core.Destroy.Core", scope: null, file: !1, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !25) // CHECK:STDOUT: !56 = !DILocation(line: 17, column: 1, scope: !53) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Base.Main", scope: null, file: !6, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Base.Main", scope: null, file: !1, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !58 = !{!59} // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !57, type: !25) // CHECK:STDOUT: !60 = !DILocation(line: 19, column: 3, scope: !57) diff --git a/toolchain/lower/testdata/interop/cpp/cpp_compat_int.carbon b/toolchain/lower/testdata/interop/cpp/cpp_compat_int.carbon index baa9947520bd..86de5beea3e9 100644 --- a/toolchain/lower/testdata/interop/cpp/cpp_compat_int.carbon +++ b/toolchain/lower/testdata/interop/cpp/cpp_compat_int.carbon @@ -71,14 +71,14 @@ fn DoubleULong64(ul64: Core.CppCompat.ULongLong64) -> u64 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "primitives.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoubleLong32", linkageName: "_CDoubleLong32.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "primitives.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DoubleLong32", linkageName: "_CDoubleLong32.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -86,7 +86,7 @@ fn DoubleULong64(ul64: Core.CppCompat.ULongLong64) -> u64 { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "DoubleULong32", linkageName: "_CDoubleULong32.Main", scope: null, file: !3, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "DoubleULong32", linkageName: "_CDoubleULong32.Main", scope: null, file: !1, line: 11, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!15, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -94,7 +94,7 @@ fn DoubleULong64(ul64: Core.CppCompat.ULongLong64) -> u64 { // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 13, column: 10, scope: !12) // CHECK:STDOUT: !19 = !DILocation(line: 13, column: 3, scope: !12) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "DoubleLongLong64", linkageName: "_CDoubleLongLong64.Main", scope: null, file: !3, line: 17, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "DoubleLongLong64", linkageName: "_CDoubleLongLong64.Main", scope: null, file: !1, line: 17, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!23, !23} // CHECK:STDOUT: !23 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) @@ -102,7 +102,7 @@ fn DoubleULong64(ul64: Core.CppCompat.ULongLong64) -> u64 { // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 19, column: 10, scope: !20) // CHECK:STDOUT: !27 = !DILocation(line: 19, column: 3, scope: !20) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "DoubleULong64", linkageName: "_CDoubleULong64.Main", scope: null, file: !3, line: 23, type: !29, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "DoubleULong64", linkageName: "_CDoubleULong64.Main", scope: null, file: !1, line: 23, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{!31, !31} // CHECK:STDOUT: !31 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) diff --git a/toolchain/lower/testdata/interop/cpp/debug_info.carbon b/toolchain/lower/testdata/interop/cpp/debug_info.carbon new file mode 100644 index 000000000000..98797d0f4c3b --- /dev/null +++ b/toolchain/lower/testdata/interop/cpp/debug_info.carbon @@ -0,0 +1,70 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// +// EXTRA-ARGS: --clang-arg=-g +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/interop/cpp/debug_info.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/interop/cpp/debug_info.carbon + +import Cpp; + +inline Cpp ''' +int f() { return 42; } +'''; + +fn Call() -> i32 { + return Cpp.f(); +} + +// CHECK:STDOUT: ; ModuleID = 'debug_info.carbon' +// CHECK:STDOUT: source_filename = "debug_info.carbon" +// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" +// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable +// CHECK:STDOUT: define dso_local noundef i32 @_Z1fv() #0 !dbg !13 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 42, !dbg !17 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define i32 @_CCall.Main() #1 !dbg !18 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %f.call = call i32 @_Z1fv(), !dbg !19 +// CHECK:STDOUT: ret i32 %f.call, !dbg !20 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +// CHECK:STDOUT: attributes #1 = { nounwind } +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.dbg.cu = !{!0, !2} +// CHECK:STDOUT: !llvm.module.flags = !{!4, !5, !6, !7, !8} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!9} +// CHECK:STDOUT: +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) +// CHECK:STDOUT: !1 = !DIFile(filename: "", directory: "", checksumkind: CSK_MD5, checksum: "d41d8cd98f00b204e9800998ecf8427e") +// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !3 = !DIFile(filename: "debug_info.carbon", directory: "") +// CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !7 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !8 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !9 = !{!10, !10, i64 0} +// CHECK:STDOUT: !10 = !{!"int", !11, i64 0} +// CHECK:STDOUT: !11 = !{!"omnipotent char", !12, i64 0} +// CHECK:STDOUT: !12 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !3, file: !3, line: 18, type: !14, scopeLine: 18, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, keyInstructions: true) +// CHECK:STDOUT: !14 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !15 = !{!16} +// CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !17 = !DILocation(line: 18, column: 11, scope: !13, atomGroup: 1, atomRank: 1) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !3, line: 21, type: !14, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = !DILocation(line: 22, column: 10, scope: !18) +// CHECK:STDOUT: !20 = !DILocation(line: 22, column: 3, scope: !18) diff --git a/toolchain/lower/testdata/interop/cpp/enum.carbon b/toolchain/lower/testdata/interop/cpp/enum.carbon index 21d610dcc2eb..b4ee11c39e9c 100644 --- a/toolchain/lower/testdata/interop/cpp/enum.carbon +++ b/toolchain/lower/testdata/interop/cpp/enum.carbon @@ -142,22 +142,22 @@ fn Call() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pass_as_arg.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "pass_as_arg.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Pass", linkageName: "_CPass.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Pass", linkageName: "_CPass.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 11, scope: !11) @@ -231,27 +231,27 @@ fn Call() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassEnum", linkageName: "_CPassEnum.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassEnum", linkageName: "_CPassEnum.Main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 9, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 8, column: 1, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "ConvertEnumToI16", linkageName: "_CConvertEnumToI16.Main", scope: null, file: !6, line: 12, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "ConvertEnumToI16", linkageName: "_CConvertEnumToI16.Main", scope: null, file: !1, line: 12, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null, !19} // CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) @@ -259,7 +259,7 @@ fn Call() { // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !16, type: !19) // CHECK:STDOUT: !22 = !DILocation(line: 13, column: 3, scope: !16) // CHECK:STDOUT: !23 = !DILocation(line: 12, column: 1, scope: !16) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "ConvertI16ToEnum", linkageName: "_CConvertI16ToEnum.Main", scope: null, file: !6, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "ConvertI16ToEnum", linkageName: "_CConvertI16ToEnum.Main", scope: null, file: !1, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !19) // CHECK:STDOUT: !27 = !DILocation(line: 17, column: 11, scope: !24) @@ -286,22 +286,22 @@ fn Call() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_bitmask.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "use_bitmask.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 10, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/interop/cpp/extern_c.carbon b/toolchain/lower/testdata/interop/cpp/extern_c.carbon index 5d398ee19039..aff4a6368b8d 100644 --- a/toolchain/lower/testdata/interop/cpp/extern_c.carbon +++ b/toolchain/lower/testdata/interop/cpp/extern_c.carbon @@ -119,22 +119,22 @@ fn MyF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_extern_c_function.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_extern_c_function.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -159,22 +159,22 @@ fn MyF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "extern_c_function_with_cpp_overload_set.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "extern_c_function_with_cpp_overload_set.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 10, column: 3, scope: !11) @@ -196,22 +196,22 @@ fn MyF() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_extern_c_variable.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_extern_c_variable.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -256,22 +256,22 @@ fn MyF() { // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_extern_c_with_special_name.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_extern_c_with_special_name.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -300,22 +300,22 @@ fn MyF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_extern_c_with_asm_label.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_extern_c_with_asm_label.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/interop/cpp/function/export/function.carbon b/toolchain/lower/testdata/interop/cpp/function/export/function.carbon index 05e934f195b2..d84b4826074e 100644 --- a/toolchain/lower/testdata/interop/cpp/function/export/function.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/export/function.carbon @@ -97,36 +97,36 @@ fn H() { Cpp.G2(); } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "other.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoArgs", linkageName: "_CNoArgs.Other", scope: null, file: !3, line: 2, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "other.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "NoArgs", linkageName: "_CNoArgs.Other", scope: null, file: !1, line: 2, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 2, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "BoolArg", linkageName: "_CBoolArg.Other", scope: null, file: !3, line: 3, type: !9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "BoolArg", linkageName: "_CBoolArg.Other", scope: null, file: !1, line: 3, type: !9, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !9 = !DISubroutineType(types: !10) // CHECK:STDOUT: !10 = !{null, !11} // CHECK:STDOUT: !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !8, type: !11) // CHECK:STDOUT: !14 = !DILocation(line: 3, column: 1, scope: !8) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "IntArg", linkageName: "_CIntArg.Other", scope: null, file: !3, line: 6, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "IntArg", linkageName: "_CIntArg.Other", scope: null, file: !1, line: 6, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 6, column: 1, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "FloatArg", linkageName: "_CFloatArg.Other", scope: null, file: !3, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "FloatArg", linkageName: "_CFloatArg.Other", scope: null, file: !1, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !11) // CHECK:STDOUT: !25 = !DILocation(line: 9, column: 1, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "IntReturn", linkageName: "_CIntReturn.Other", scope: null, file: !3, line: 12, type: !27, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "IntReturn", linkageName: "_CIntReturn.Other", scope: null, file: !1, line: 12, type: !27, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{!18} // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 3, scope: !26) @@ -244,17 +244,17 @@ fn H() { Cpp.G2(); } // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "function.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "function.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -263,30 +263,30 @@ fn H() { Cpp.G2(); } // CHECK:STDOUT: !12 = !{!"bool", !9, i64 0} // CHECK:STDOUT: !13 = !{!14, !14, i64 0} // CHECK:STDOUT: !14 = !{!"float", !9, i64 0} -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "NoArgs__carbon_thunk", linkageName: "_CNoArgs__carbon_thunk.Other", scope: null, file: !16, line: 2, type: !17, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "NoArgs__carbon_thunk", linkageName: "_CNoArgs__carbon_thunk.Other", scope: null, file: !16, line: 2, type: !17, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !16 = !DIFile(filename: "other.carbon", directory: "") // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{null} // CHECK:STDOUT: !19 = !DILocation(line: 2, column: 1, scope: !15) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "BoolArg__carbon_thunk", linkageName: "_CBoolArg__carbon_thunk.Other", scope: null, file: !16, line: 3, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "BoolArg__carbon_thunk", linkageName: "_CBoolArg__carbon_thunk.Other", scope: null, file: !16, line: 3, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 3, column: 1, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "IntArg__carbon_thunk", linkageName: "_CIntArg__carbon_thunk.Other", scope: null, file: !16, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "IntArg__carbon_thunk", linkageName: "_CIntArg__carbon_thunk.Other", scope: null, file: !16, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !27, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 6, column: 1, scope: !27) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "FloatArg__carbon_thunk", linkageName: "_CFloatArg__carbon_thunk.Other", scope: null, file: !16, line: 9, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "FloatArg__carbon_thunk", linkageName: "_CFloatArg__carbon_thunk.Other", scope: null, file: !16, line: 9, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !23) // CHECK:STDOUT: !37 = !DILocation(line: 9, column: 1, scope: !34) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "IntReturn__carbon_thunk", linkageName: "_CIntReturn__carbon_thunk.Other", scope: null, file: !16, line: 12, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "IntReturn__carbon_thunk", linkageName: "_CIntReturn__carbon_thunk.Other", scope: null, file: !16, line: 12, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !30) // CHECK:STDOUT: !41 = !DILocation(line: 12, column: 1, scope: !38) @@ -344,27 +344,27 @@ fn H() { Cpp.G2(); } // CHECK:STDOUT: attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "single_file.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "single_file.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 1, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !16 = !DILocation(line: 6, column: 1, scope: !15) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !6, line: 20, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 20, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DILocation(line: 20, column: 10, scope: !17) // CHECK:STDOUT: !19 = !DILocation(line: 20, column: 1, scope: !17) diff --git a/toolchain/lower/testdata/interop/cpp/function/import/cpp_run.carbon b/toolchain/lower/testdata/interop/cpp/function/import/cpp_run.carbon index cf6aec02e349..0abcc3e36a74 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/cpp_run.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/cpp_run.carbon @@ -43,22 +43,22 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "carbon_run.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "carbon_run.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon b/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon index 276b009627af..310e4353bc22 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon @@ -149,22 +149,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_function_decl.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_function_decl.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -192,22 +192,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_inline_function_decl.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_inline_function_decl.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -240,22 +240,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_inline_used_function_decl.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_inline_used_function_decl.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -301,22 +301,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_multiple_inline_function_decls.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_multiple_inline_function_decls.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -356,22 +356,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_inline_recursive_function_decl.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_inline_recursive_function_decl.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 8, column: 3, scope: !11) @@ -456,22 +456,22 @@ fn MyF() -> i32 { // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call_with_default_args.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call_with_default_args.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -486,7 +486,7 @@ fn MyF() -> i32 { // CHECK:STDOUT: !23 = !DILocation(line: 13, column: 3, scope: !11) // CHECK:STDOUT: !24 = !DILocation(line: 14, column: 10, scope: !11) // CHECK:STDOUT: !25 = !DILocation(line: 14, column: 3, scope: !11) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 11, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 11, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{null, !14} // CHECK:STDOUT: !29 = !{!30} diff --git a/toolchain/lower/testdata/interop/cpp/function/import/function_in_template.carbon b/toolchain/lower/testdata/interop/cpp/function/import/function_in_template.carbon index 1b546ead3faa..8131ffaf1cc0 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/function_in_template.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/function_in_template.carbon @@ -55,22 +55,22 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_class_template.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "use_class_template.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 8, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon b/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon index 3c01cf315903..a268b2546fdf 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon @@ -64,17 +64,17 @@ fn Call() -> i32 { // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_inline.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_inline.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} @@ -82,7 +82,7 @@ fn Call() -> i32 { // CHECK:STDOUT: !11 = !{!12, !12, i64 0} // CHECK:STDOUT: !12 = !{!"p1 int", !13, i64 0} // CHECK:STDOUT: !13 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -90,7 +90,7 @@ fn Call() -> i32 { // CHECK:STDOUT: !19 = !DILocation(line: 23, column: 3, scope: !14) // CHECK:STDOUT: !20 = !DILocation(line: 24, column: 10, scope: !14) // CHECK:STDOUT: !21 = !DILocation(line: 24, column: 3, scope: !14) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !17} // CHECK:STDOUT: !25 = !{!26} diff --git a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon index 74bbac56c895..b66b8b26763b 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon @@ -273,22 +273,22 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_ints.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_ints.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 19, scope: !11) @@ -308,35 +308,35 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !28 = !{!9, !9, i64 0} // CHECK:STDOUT: !29 = !{!30, !30, i64 0} // CHECK:STDOUT: !30 = !{!"short", !9, i64 0} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6fd0ed7da7a22bb4:core.Destroy.Core", scope: null, file: !6, line: 9, type: !32, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6fd0ed7da7a22bb4:core.Destroy.Core", scope: null, file: !1, line: 9, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{null, !34} // CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !31, type: !34) // CHECK:STDOUT: !37 = !DILocation(line: 9, column: 24, scope: !31) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !6, line: 9, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !1, line: 9, type: !39, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !39 = !DISubroutineType(types: !40) // CHECK:STDOUT: !40 = !{null, !41} // CHECK:STDOUT: !41 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !38, type: !41) // CHECK:STDOUT: !44 = !DILocation(line: 9, column: 21, scope: !38) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !6, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !1, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !46 = !DISubroutineType(types: !47) // CHECK:STDOUT: !47 = !{null, !48} // CHECK:STDOUT: !48 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !49 = !{!50} // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !45, type: !48) // CHECK:STDOUT: !51 = !DILocation(line: 7, column: 22, scope: !45) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !6, line: 7, type: !53, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !1, line: 7, type: !53, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !53 = !DISubroutineType(types: !54) // CHECK:STDOUT: !54 = !{null, !55} // CHECK:STDOUT: !55 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !52, type: !55) // CHECK:STDOUT: !58 = !DILocation(line: 7, column: 19, scope: !52) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !6, line: 16, type: !60, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !1, line: 16, type: !60, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !60 = !DISubroutineType(types: !61) // CHECK:STDOUT: !61 = !{null, !48, !62} // CHECK:STDOUT: !62 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -352,7 +352,7 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !72 = !DILocation(line: 19, column: 3, scope: !59) // CHECK:STDOUT: !73 = !DILocation(line: 20, column: 3, scope: !59) // CHECK:STDOUT: !74 = !DILocation(line: 16, column: 1, scope: !59) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !76 = !DILocation(line: 14, column: 1, scope: !75) // CHECK:STDOUT: !77 = !DILocation(line: 0, scope: !75) // CHECK:STDOUT: ; ModuleID = 'import_struct.carbon' @@ -436,22 +436,22 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_struct.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_struct.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -463,14 +463,14 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !20 = !{!21, !21, i64 0} // CHECK:STDOUT: !21 = !{!"p1 _ZTS1X", !22, i64 0} // CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !24, line: 2, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !24, line: 2, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !24 = !DIFile(filename: "./struct.h", directory: "") // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !28 = !DILocation(line: 2, column: 8, scope: !23) // CHECK:STDOUT: !29 = !{i64 0, i64 4, !7, i64 4, i64 4, !7, i64 8, i64 4, !7} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !31, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !31, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !31 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !32 = !DILocation(line: 9, column: 28, scope: !30) // CHECK:STDOUT: !33 = !DILocation(line: 9, column: 21, scope: !30) @@ -542,22 +542,22 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -569,11 +569,11 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !20 = !{!21, !21, i64 0} // CHECK:STDOUT: !21 = !{!"p1 _ZTS1Y", !22, i64 0} // CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !6, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !24 = !DILocation(line: 17, column: 19, scope: !23) // CHECK:STDOUT: !25 = !DILocation(line: 17, column: 3, scope: !23) // CHECK:STDOUT: !26 = !DILocation(line: 16, column: 1, scope: !23) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !6, line: 20, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !1, line: 20, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !30} // CHECK:STDOUT: !30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/function/import/return.carbon b/toolchain/lower/testdata/interop/cpp/function/import/return.carbon index 2c2079ab13ab..f1b818d1c575 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/return.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/return.carbon @@ -388,22 +388,22 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_ints.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_ints.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetU8", linkageName: "_CGetU8.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetU8", linkageName: "_CGetU8.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) @@ -413,7 +413,7 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !18 = !{!"p1 omnipotent char", !19, i64 0} // CHECK:STDOUT: !19 = !{!"any pointer", !9, i64 0} // CHECK:STDOUT: !20 = !{!9, !9, i64 0} -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "GetU16", linkageName: "_CGetU16.Main", scope: null, file: !6, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "GetU16", linkageName: "_CGetU16.Main", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) @@ -423,43 +423,43 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !28 = !{!"p1 short", !19, i64 0} // CHECK:STDOUT: !29 = !{!30, !30, i64 0} // CHECK:STDOUT: !30 = !{!"short", !9, i64 0} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "GetU32", linkageName: "_CGetU32.Main", scope: null, file: !6, line: 8, type: !32, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "GetU32", linkageName: "_CGetU32.Main", scope: null, file: !1, line: 8, type: !32, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !35 = !DILocation(line: 8, column: 29, scope: !31) // CHECK:STDOUT: !36 = !DILocation(line: 8, column: 22, scope: !31) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "GetU64", linkageName: "_CGetU64.Main", scope: null, file: !6, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "GetU64", linkageName: "_CGetU64.Main", scope: null, file: !1, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !38 = !DISubroutineType(types: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !41 = !DILocation(line: 9, column: 29, scope: !37) // CHECK:STDOUT: !42 = !DILocation(line: 9, column: 22, scope: !37) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "GetI8", linkageName: "_CGetI8.Main", scope: null, file: !6, line: 11, type: !44, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "GetI8", linkageName: "_CGetI8.Main", scope: null, file: !1, line: 11, type: !44, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !44 = !DISubroutineType(types: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) // CHECK:STDOUT: !47 = !DILocation(line: 11, column: 27, scope: !43) // CHECK:STDOUT: !48 = !DILocation(line: 11, column: 20, scope: !43) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "GetI16", linkageName: "_CGetI16.Main", scope: null, file: !6, line: 12, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "GetI16", linkageName: "_CGetI16.Main", scope: null, file: !1, line: 12, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !50 = !DISubroutineType(types: !51) // CHECK:STDOUT: !51 = !{!52} // CHECK:STDOUT: !52 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !53 = !DILocation(line: 12, column: 29, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 12, column: 22, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "GetI32", linkageName: "_CGetI32.Main", scope: null, file: !6, line: 13, type: !56, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "GetI32", linkageName: "_CGetI32.Main", scope: null, file: !1, line: 13, type: !56, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !56 = !DISubroutineType(types: !57) // CHECK:STDOUT: !57 = !{!58} // CHECK:STDOUT: !58 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !59 = !DILocation(line: 13, column: 29, scope: !55) // CHECK:STDOUT: !60 = !DILocation(line: 13, column: 22, scope: !55) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "GetI64", linkageName: "_CGetI64.Main", scope: null, file: !6, line: 14, type: !62, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "GetI64", linkageName: "_CGetI64.Main", scope: null, file: !1, line: 14, type: !62, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !62 = !DISubroutineType(types: !63) // CHECK:STDOUT: !63 = !{!64} // CHECK:STDOUT: !64 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) // CHECK:STDOUT: !65 = !DILocation(line: 14, column: 29, scope: !61) // CHECK:STDOUT: !66 = !DILocation(line: 14, column: 22, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Lets", linkageName: "_CLets.Main", scope: null, file: !6, line: 18, type: !68, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Lets", linkageName: "_CLets.Main", scope: null, file: !1, line: 18, type: !68, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !68 = !DISubroutineType(types: !69) // CHECK:STDOUT: !69 = !{null} // CHECK:STDOUT: !70 = !DILocation(line: 19, column: 19, scope: !67) @@ -472,31 +472,31 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !77 = !DILocation(line: 27, column: 21, scope: !67) // CHECK:STDOUT: !78 = !DILocation(line: 29, column: 3, scope: !67) // CHECK:STDOUT: !79 = !DILocation(line: 18, column: 1, scope: !67) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !6, line: 25, type: !81, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb6702152d47e49f:core.Destroy.Core", scope: null, file: !1, line: 25, type: !81, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !83) // CHECK:STDOUT: !81 = !DISubroutineType(types: !82) // CHECK:STDOUT: !82 = !{null, !52} // CHECK:STDOUT: !83 = !{!84} // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !80, type: !52) // CHECK:STDOUT: !85 = !DILocation(line: 25, column: 21, scope: !80) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !6, line: 24, type: !87, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp.578b3934f85dbca6:core.Destroy.Core", scope: null, file: !1, line: 24, type: !87, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !89) // CHECK:STDOUT: !87 = !DISubroutineType(types: !88) // CHECK:STDOUT: !88 = !{null, !46} // CHECK:STDOUT: !89 = !{!90} // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !86, type: !46) // CHECK:STDOUT: !91 = !DILocation(line: 24, column: 19, scope: !86) -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6fd0ed7da7a22bb4:core.Destroy.Core", scope: null, file: !6, line: 20, type: !93, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !95) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6fd0ed7da7a22bb4:core.Destroy.Core", scope: null, file: !1, line: 20, type: !93, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !95) // CHECK:STDOUT: !93 = !DISubroutineType(types: !94) // CHECK:STDOUT: !94 = !{null, !24} // CHECK:STDOUT: !95 = !{!96} // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !92, type: !24) // CHECK:STDOUT: !97 = !DILocation(line: 20, column: 21, scope: !92) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !6, line: 19, type: !99, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !101) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c3b9dc9c7e0d5d3d:core.Destroy.Core", scope: null, file: !1, line: 19, type: !99, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !101) // CHECK:STDOUT: !99 = !DISubroutineType(types: !100) // CHECK:STDOUT: !100 = !{null, !14} // CHECK:STDOUT: !101 = !{!102} // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !98, type: !14) // CHECK:STDOUT: !103 = !DILocation(line: 19, column: 19, scope: !98) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !6, line: 32, type: !68, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !1, line: 32, type: !68, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !105 = !DILocation(line: 33, column: 3, scope: !104) // CHECK:STDOUT: !106 = !DILocation(line: 34, column: 3, scope: !104) // CHECK:STDOUT: !107 = !DILocation(line: 35, column: 3, scope: !104) @@ -523,25 +523,25 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !128 = !DILocation(line: 43, column: 61, scope: !104) // CHECK:STDOUT: !129 = !DILocation(line: 43, column: 3, scope: !104) // CHECK:STDOUT: !130 = !DILocation(line: 32, column: 1, scope: !104) -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fbec46972c1998a0:core.Destroy.Core", scope: null, file: !6, line: 41, type: !132, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !134) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fbec46972c1998a0:core.Destroy.Core", scope: null, file: !1, line: 41, type: !132, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !134) // CHECK:STDOUT: !132 = !DISubroutineType(types: !133) // CHECK:STDOUT: !133 = !{null, !64} // CHECK:STDOUT: !134 = !{!135} // CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !131, type: !64) // CHECK:STDOUT: !136 = !DILocation(line: 41, column: 3, scope: !131) -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 40, type: !138, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 40, type: !138, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !140) // CHECK:STDOUT: !138 = !DISubroutineType(types: !139) // CHECK:STDOUT: !139 = !{null, !58} // CHECK:STDOUT: !140 = !{!141} // CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !137, type: !58) // CHECK:STDOUT: !142 = !DILocation(line: 40, column: 3, scope: !137) -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Op", linkageName: "_COp.df57f49075d1fe6b:core.Destroy.Core", scope: null, file: !6, line: 36, type: !144, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !146) +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Op", linkageName: "_COp.df57f49075d1fe6b:core.Destroy.Core", scope: null, file: !1, line: 36, type: !144, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !146) // CHECK:STDOUT: !144 = !DISubroutineType(types: !145) // CHECK:STDOUT: !145 = !{null, !40} // CHECK:STDOUT: !146 = !{!147} // CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !143, type: !40) // CHECK:STDOUT: !148 = !DILocation(line: 36, column: 3, scope: !143) -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Op", linkageName: "_COp.45ecfb19e8cc5ab3:core.Destroy.Core", scope: null, file: !6, line: 35, type: !150, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Op", linkageName: "_COp.45ecfb19e8cc5ab3:core.Destroy.Core", scope: null, file: !1, line: 35, type: !150, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !152) // CHECK:STDOUT: !150 = !DISubroutineType(types: !151) // CHECK:STDOUT: !151 = !{null, !34} // CHECK:STDOUT: !152 = !{!153} @@ -608,22 +608,22 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_class.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_class.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -632,12 +632,12 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !17 = !{!18, !18, i64 0} // CHECK:STDOUT: !18 = !{!"p1 _ZTS1X", !19, i64 0} // CHECK:STDOUT: !19 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !6, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null} // CHECK:STDOUT: !23 = !DILocation(line: 9, column: 18, scope: !20) // CHECK:STDOUT: !24 = !DILocation(line: 8, column: 1, scope: !20) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !6, line: 12, type: !21, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !1, line: 12, type: !21, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DILocation(line: 13, column: 3, scope: !25) // CHECK:STDOUT: !27 = !DILocation(line: 13, column: 18, scope: !25) // CHECK:STDOUT: !28 = !DILocation(line: 12, column: 1, scope: !25) @@ -677,22 +677,22 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/globals.carbon b/toolchain/lower/testdata/interop/cpp/globals.carbon index 799d5941768b..7fd3362deccf 100644 --- a/toolchain/lower/testdata/interop/cpp/globals.carbon +++ b/toolchain/lower/testdata/interop/cpp/globals.carbon @@ -171,22 +171,22 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_global.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_global.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 1, scope: !11) @@ -286,22 +286,22 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_inline.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_inline.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !11) @@ -389,27 +389,27 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "todo_import_thread_local.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "todo_import_thread_local.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ThreadLocalStore", linkageName: "_CThreadLocalStore.Main", scope: null, file: !6, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ThreadLocalStore", linkageName: "_CThreadLocalStore.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 10, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 9, column: 1, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "ThreadLocalTriggerInit", linkageName: "_CThreadLocalTriggerInit.Main", scope: null, file: !6, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "ThreadLocalTriggerInit", linkageName: "_CThreadLocalTriggerInit.Main", scope: null, file: !1, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DISubroutineType(types: !18) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -434,22 +434,22 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_static.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_static.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadStatic", linkageName: "_CReadStatic.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadStatic", linkageName: "_CReadStatic.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -480,28 +480,28 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_var_template.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_var_template.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadVarTemplate", linkageName: "_CReadVarTemplate.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadVarTemplate", linkageName: "_CReadVarTemplate.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ReadVarTemplateWithConstructor", linkageName: "_CReadVarTemplateWithConstructor.Main", scope: null, file: !6, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ReadVarTemplateWithConstructor", linkageName: "_CReadVarTemplateWithConstructor.Main", scope: null, file: !1, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -531,28 +531,28 @@ fn ReadStaticVarTemplateWithConstructor() -> Cpp.Y* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_static_template.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "import_static_template.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadStaticVarTemplate", linkageName: "_CReadStaticVarTemplate.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReadStaticVarTemplate", linkageName: "_CReadStaticVarTemplate.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ReadStaticVarTemplateWithConstructor", linkageName: "_CReadStaticVarTemplateWithConstructor.Main", scope: null, file: !6, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ReadStaticVarTemplateWithConstructor", linkageName: "_CReadStaticVarTemplateWithConstructor.Main", scope: null, file: !1, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/interop/cpp/issue7142.carbon b/toolchain/lower/testdata/interop/cpp/issue7142.carbon index e8b40eeb8cf5..03084d3789e8 100644 --- a/toolchain/lower/testdata/interop/cpp/issue7142.carbon +++ b/toolchain/lower/testdata/interop/cpp/issue7142.carbon @@ -101,46 +101,46 @@ void f() { // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "issue7142.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "issue7142.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !11 = !{!12, !8, i64 0} // CHECK:STDOUT: !12 = !{!"_ZTSN6Carbon1AE", !8, i64 0} -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Get__carbon_thunk", linkageName: "_CGet__carbon_thunk.Main", scope: null, file: !6, line: 16, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Get__carbon_thunk", linkageName: "_CGet__carbon_thunk.Main", scope: null, file: !1, line: 16, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 16, column: 1, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !6, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !1, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !16) // CHECK:STDOUT: !23 = !DILocation(line: 15, column: 1, scope: !20) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{null, !27} // CHECK:STDOUT: !27 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !24, type: !27) // CHECK:STDOUT: !30 = !DILocation(line: 15, column: 1, scope: !24) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.dd803598fd1f0f08:core.Destroy.Core", scope: null, file: !6, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.dd803598fd1f0f08:core.Destroy.Core", scope: null, file: !1, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !32 = !{!33} // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !31, type: !16) // CHECK:STDOUT: !34 = !DILocation(line: 15, column: 1, scope: !31) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !6, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.68011419f123494e:core.Destroy.Core", scope: null, file: !1, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !16) // CHECK:STDOUT: !38 = !DILocation(line: 15, column: 1, scope: !35) diff --git a/toolchain/lower/testdata/interop/cpp/nullptr.carbon b/toolchain/lower/testdata/interop/cpp/nullptr.carbon index c9a3f395846b..760c1c223f4d 100644 --- a/toolchain/lower/testdata/interop/cpp/nullptr.carbon +++ b/toolchain/lower/testdata/interop/cpp/nullptr.carbon @@ -214,22 +214,22 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "simple.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassNullptr", linkageName: "_CPassNullptr.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassNullptr", linkageName: "_CPassNullptr.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 12, column: 15, scope: !11) @@ -240,56 +240,56 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: !19 = !{!20, !20, i64 0} // CHECK:STDOUT: !20 = !{!"p1 std::nullptr_t", !21, i64 0} // CHECK:STDOUT: !21 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd39a15e7d61228d:core.Destroy.Core", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd39a15e7d61228d:core.Destroy.Core", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !22, type: !25) // CHECK:STDOUT: !28 = !DILocation(line: 14, column: 19, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.125695b29f2cf97c:core.Destroy.Core", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.125695b29f2cf97c:core.Destroy.Core", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !25) // CHECK:STDOUT: !32 = !DILocation(line: 14, column: 19, scope: !29) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37a0be3fec6961f4:core.Destroy.Core", scope: null, file: !6, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.37a0be3fec6961f4:core.Destroy.Core", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !33, type: !25) // CHECK:STDOUT: !36 = !DILocation(line: 14, column: 19, scope: !33) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.32a070744df634d9:core.Destroy.Core", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.32a070744df634d9:core.Destroy.Core", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !37, type: !25) // CHECK:STDOUT: !40 = !DILocation(line: 12, column: 15, scope: !37) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.958634845f762cfe:core.Destroy.Core", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.958634845f762cfe:core.Destroy.Core", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !25) // CHECK:STDOUT: !44 = !DILocation(line: 12, column: 15, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.197d85846f87d79f:core.Destroy.Core", scope: null, file: !6, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.197d85846f87d79f:core.Destroy.Core", scope: null, file: !1, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !25) // CHECK:STDOUT: !48 = !DILocation(line: 12, column: 15, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !6, line: 17, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !1, line: 17, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !50 = !DISubroutineType(types: !51) // CHECK:STDOUT: !51 = !{!25} // CHECK:STDOUT: !52 = !DILocation(line: 18, column: 10, scope: !49) // CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !49) -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !6, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !1, line: 21, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !55 = !DILocation(line: 22, column: 3, scope: !54) // CHECK:STDOUT: !56 = !DILocation(line: 22, column: 26, scope: !54) // CHECK:STDOUT: !57 = !DILocation(line: 23, column: 10, scope: !54) // CHECK:STDOUT: !58 = !DILocation(line: 23, column: 3, scope: !54) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !6, line: 26, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !1, line: 26, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !60 = !DILocation(line: 27, column: 3, scope: !59) // CHECK:STDOUT: !61 = !DILocation(line: 27, column: 26, scope: !59) // CHECK:STDOUT: !62 = !DILocation(line: 28, column: 10, scope: !59) // CHECK:STDOUT: !63 = !DILocation(line: 28, column: 3, scope: !59) // CHECK:STDOUT: !64 = !{!65, !65, i64 0} // CHECK:STDOUT: !65 = !{!"std::nullptr_t", !9, i64 0} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !6, line: 31, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !1, line: 31, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !67 = !DILocation(line: 32, column: 10, scope: !66) // CHECK:STDOUT: !68 = !DILocation(line: 32, column: 3, scope: !66) -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !6, line: 35, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !1, line: 35, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !70 = !DILocation(line: 36, column: 3, scope: !69) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.269b9b75d033aabb.Core.84588f41d61dafba", scope: null, file: !72, line: 51, type: !73, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.269b9b75d033aabb.Core.84588f41d61dafba", scope: null, file: !72, line: 51, type: !73, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !75) // CHECK:STDOUT: !72 = !DIFile(filename: "{{.*}}/prelude/types/cpp/nullptr.carbon", directory: "") // CHECK:STDOUT: !73 = !DISubroutineType(types: !74) // CHECK:STDOUT: !74 = !{!25, !25} @@ -297,6 +297,6 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !71, type: !25) // CHECK:STDOUT: !77 = !DILocation(line: 52, column: 14, scope: !71) // CHECK:STDOUT: !78 = !DILocation(line: 52, column: 7, scope: !71) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.a636f8d928e21310", scope: null, file: !80, line: 30, type: !50, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.a636f8d928e21310", scope: null, file: !80, line: 30, type: !50, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !80 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !81 = !DILocation(line: 31, column: 5, scope: !79) diff --git a/toolchain/lower/testdata/interop/cpp/operators.carbon b/toolchain/lower/testdata/interop/cpp/operators.carbon index ce46e8d55fa8..b44356f7ec61 100644 --- a/toolchain/lower/testdata/interop/cpp/operators.carbon +++ b/toolchain/lower/testdata/interop/cpp/operators.carbon @@ -227,22 +227,22 @@ fn Driver(x: Cpp.A, y: Cpp.A) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "eq_with.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "eq_with.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !6, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !1, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -259,19 +259,19 @@ fn Driver(x: Cpp.A, y: Cpp.A) { // CHECK:STDOUT: !25 = !{i64 0, i64 4, !7} // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"bool", !9, i64 0} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.ffb401eeee8c4872.Core:Cpp", scope: null, file: !6, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.ffb401eeee8c4872.Core:Cpp", scope: null, file: !1, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{!14, !14, !14} // CHECK:STDOUT: !31 = !{!32, !33} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !14) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !28, type: !14) // CHECK:STDOUT: !34 = !DILocation(line: 8, column: 15, scope: !28) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.ffb401eeee8c4872.Core:Cpp", scope: null, file: !6, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.ffb401eeee8c4872.Core:Cpp", scope: null, file: !1, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37, !38} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14) // CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !35, type: !14) // CHECK:STDOUT: !39 = !DILocation(line: 12, column: 15, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CheckEqWith", linkageName: "_CCheckEqWith.Main.bdef5a2ed02e32a1", scope: null, file: !6, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "CheckEqWith", linkageName: "_CCheckEqWith.Main.bdef5a2ed02e32a1", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42, !43} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !40, type: !14) @@ -554,22 +554,22 @@ fn Driver(x: Cpp.A, y: Cpp.A) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "ordered_with.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "ordered_with.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !6, line: 33, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Driver", linkageName: "_CDriver.Main", scope: null, file: !1, line: 33, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -586,29 +586,29 @@ fn Driver(x: Cpp.A, y: Cpp.A) { // CHECK:STDOUT: !25 = !{i64 0, i64 4, !7} // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"bool", !9, i64 0} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Less", linkageName: "_CLess:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !6, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Less", linkageName: "_CLess:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !1, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{!14, !14, !14} // CHECK:STDOUT: !31 = !{!32, !33} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !28, type: !14) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !28, type: !14) // CHECK:STDOUT: !34 = !DILocation(line: 8, column: 15, scope: !28) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "LessOrEquivalent", linkageName: "_CLessOrEquivalent:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !6, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "LessOrEquivalent", linkageName: "_CLessOrEquivalent:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !1, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37, !38} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14) // CHECK:STDOUT: !38 = !DILocalVariable(arg: 2, scope: !35, type: !14) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 15, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Greater", linkageName: "_CGreater:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !6, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Greater", linkageName: "_CGreater:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !1, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42, !43} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !14) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !40, type: !14) // CHECK:STDOUT: !44 = !DILocation(line: 12, column: 15, scope: !40) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "GreaterOrEquivalent", linkageName: "_CGreaterOrEquivalent:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !6, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "GreaterOrEquivalent", linkageName: "_CGreaterOrEquivalent:thunk:OrderedWith.92c0df05bd55f97a.Core:Cpp", scope: null, file: !1, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47, !48} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !14) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 2, scope: !45, type: !14) // CHECK:STDOUT: !49 = !DILocation(line: 20, column: 15, scope: !45) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "CheckOrderedWith", linkageName: "_CCheckOrderedWith.Main.c49adfa90bd18905", scope: null, file: !6, line: 26, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "CheckOrderedWith", linkageName: "_CCheckOrderedWith.Main.c49adfa90bd18905", scope: null, file: !1, line: 26, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !51 = !{!52, !53} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !50, type: !14) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !50, type: !14) diff --git a/toolchain/lower/testdata/interop/cpp/pointer.carbon b/toolchain/lower/testdata/interop/cpp/pointer.carbon index fa6543715a69..1029d3e9d2c4 100644 --- a/toolchain/lower/testdata/interop/cpp/pointer.carbon +++ b/toolchain/lower/testdata/interop/cpp/pointer.carbon @@ -164,22 +164,22 @@ fn Convert() { // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nonnull.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "nonnull.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -187,12 +187,12 @@ fn Convert() { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 3, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 14, column: 1, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !6, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !1, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{!14} // CHECK:STDOUT: !22 = !DILocation(line: 19, column: 10, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 3, scope: !19) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !14) // CHECK:STDOUT: !27 = !DILocation(line: 23, column: 3, scope: !24) @@ -200,7 +200,7 @@ fn Convert() { // CHECK:STDOUT: !29 = !{!30, !30, i64 0} // CHECK:STDOUT: !30 = !{!"p1 _ZTS1C", !31, i64 0} // CHECK:STDOUT: !31 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !6, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !1, line: 26, type: !20, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !33 = !DILocation(line: 27, column: 10, scope: !32) // CHECK:STDOUT: !34 = !DILocation(line: 27, column: 3, scope: !32) // CHECK:STDOUT: ; ModuleID = 'nullable.carbon' @@ -344,56 +344,56 @@ fn Convert() { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nullable.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "nullable.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassNonnullPtr", linkageName: "_CPassNonnullPtr.Main", scope: null, file: !6, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "PassNonnullPtr", linkageName: "_CPassNonnullPtr.Main", scope: null, file: !1, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !21 = !DILocation(line: 22, column: 15, scope: !18) // CHECK:STDOUT: !22 = !DILocation(line: 22, column: 3, scope: !18) // CHECK:STDOUT: !23 = !DILocation(line: 19, column: 1, scope: !18) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b66d38b36d1f26ac:core.Destroy.Core", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b66d38b36d1f26ac:core.Destroy.Core", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !14) // CHECK:STDOUT: !27 = !DILocation(line: 22, column: 15, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0eaa291c18f0461d:core.Destroy.Core", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0eaa291c18f0461d:core.Destroy.Core", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !14) // CHECK:STDOUT: !31 = !DILocation(line: 22, column: 15, scope: !28) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f38d07f92d84f295:core.Destroy.Core", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f38d07f92d84f295:core.Destroy.Core", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !14) // CHECK:STDOUT: !35 = !DILocation(line: 22, column: 15, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !6, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !1, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !37 = !DISubroutineType(types: !38) // CHECK:STDOUT: !38 = !{!14} // CHECK:STDOUT: !39 = !DILocation(line: 26, column: 10, scope: !36) // CHECK:STDOUT: !40 = !DILocation(line: 26, column: 3, scope: !36) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !6, line: 29, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !1, line: 29, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !14) // CHECK:STDOUT: !44 = !DILocation(line: 29, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !6, line: 34, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !1, line: 34, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !14) // CHECK:STDOUT: !48 = !DILocation(line: 35, column: 24, scope: !45) @@ -402,10 +402,10 @@ fn Convert() { // CHECK:STDOUT: !51 = !{!52, !52, i64 0} // CHECK:STDOUT: !52 = !{!"p1 _ZTS1C", !53, i64 0} // CHECK:STDOUT: !53 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !6, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !1, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !55 = !DILocation(line: 39, column: 10, scope: !54) // CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !54) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0df7ee04ac3e2bca", scope: null, file: !58, line: 105, type: !59, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0df7ee04ac3e2bca", scope: null, file: !58, line: 105, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !58 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !59 = !DISubroutineType(types: !60) // CHECK:STDOUT: !60 = !{!14, !14} @@ -413,17 +413,17 @@ fn Convert() { // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !57, type: !14) // CHECK:STDOUT: !63 = !DILocation(line: 106, column: 12, scope: !57) // CHECK:STDOUT: !64 = !DILocation(line: 106, column: 5, scope: !57) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.ce205433e72b0023", scope: null, file: !58, line: 80, type: !59, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.ce205433e72b0023", scope: null, file: !58, line: 80, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !66) // CHECK:STDOUT: !66 = !{!67} // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !65, type: !14) // CHECK:STDOUT: !68 = !DILocation(line: 81, column: 12, scope: !65) // CHECK:STDOUT: !69 = !DILocation(line: 81, column: 5, scope: !65) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ce205433e72b0023", scope: null, file: !58, line: 33, type: !59, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ce205433e72b0023", scope: null, file: !58, line: 33, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !71) // CHECK:STDOUT: !71 = !{!72} // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !70, type: !14) // CHECK:STDOUT: !73 = !DILocation(line: 34, column: 12, scope: !70) // CHECK:STDOUT: !74 = !DILocation(line: 34, column: 5, scope: !70) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !58, line: 166, type: !59, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !58, line: 166, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !76) // CHECK:STDOUT: !76 = !{!77} // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !75, type: !14) // CHECK:STDOUT: !78 = !DILocation(line: 167, column: 14, scope: !75) @@ -579,55 +579,55 @@ fn Convert() { // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "add_const.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "add_const.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 9, column: 12, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 9, column: 3, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 8, column: 1, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4a199b7f45343bf7:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4a199b7f45343bf7:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !20} // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !17, type: !20) // CHECK:STDOUT: !23 = !DILocation(line: 9, column: 12, scope: !17) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95d54adfec6e2c8e:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95d54adfec6e2c8e:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !20) // CHECK:STDOUT: !27 = !DILocation(line: 9, column: 12, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4713799e8769f265:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4713799e8769f265:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !20) // CHECK:STDOUT: !31 = !DILocation(line: 9, column: 12, scope: !28) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b66d38b36d1f26ac:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b66d38b36d1f26ac:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !20) // CHECK:STDOUT: !35 = !DILocation(line: 9, column: 12, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0eaa291c18f0461d:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0eaa291c18f0461d:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !37) // CHECK:STDOUT: !37 = !{!38} // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 9, column: 12, scope: !36) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2b115399396a8344:core.Destroy.Core", scope: null, file: !6, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2b115399396a8344:core.Destroy.Core", scope: null, file: !1, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 9, column: 12, scope: !40) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.26284956f90c5004", scope: null, file: !45, line: 105, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.26284956f90c5004", scope: null, file: !45, line: 105, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !48) // CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !46 = !DISubroutineType(types: !47) // CHECK:STDOUT: !47 = !{!20, !20} @@ -635,7 +635,7 @@ fn Convert() { // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !50 = !DILocation(line: 106, column: 12, scope: !44) // CHECK:STDOUT: !51 = !DILocation(line: 106, column: 5, scope: !44) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.ba0bf13f1b5bc657", scope: null, file: !45, line: 95, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.ba0bf13f1b5bc657", scope: null, file: !45, line: 95, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !20) // CHECK:STDOUT: !55 = !DILocation(line: 97, column: 31, scope: !52) @@ -645,36 +645,36 @@ fn Convert() { // CHECK:STDOUT: !59 = !DILocation(line: 97, column: 7, scope: !52) // CHECK:STDOUT: !60 = !DILocation(line: 99, column: 12, scope: !52) // CHECK:STDOUT: !61 = !DILocation(line: 99, column: 5, scope: !52) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.0d555305d9583d05", scope: null, file: !45, line: 36, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.0d555305d9583d05", scope: null, file: !45, line: 36, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !63 = !{!64} // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !62, type: !20) // CHECK:STDOUT: !65 = !DILocation(line: 37, column: 12, scope: !62) // CHECK:STDOUT: !66 = !DILocation(line: 37, column: 5, scope: !62) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.0d555305d9583d05", scope: null, file: !45, line: 39, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.0d555305d9583d05", scope: null, file: !45, line: 39, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !68 = !{!69} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !67, type: !20) // CHECK:STDOUT: !70 = !DILocation(line: 40, column: 12, scope: !67) // CHECK:STDOUT: !71 = !DILocation(line: 40, column: 5, scope: !67) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.deb37f08ddf50b30", scope: null, file: !45, line: 33, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.deb37f08ddf50b30", scope: null, file: !45, line: 33, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !73) // CHECK:STDOUT: !73 = !{!74} // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !20) // CHECK:STDOUT: !75 = !DILocation(line: 34, column: 12, scope: !72) // CHECK:STDOUT: !76 = !DILocation(line: 34, column: 5, scope: !72) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.deb37f08ddf50b30", scope: null, file: !45, line: 30, type: !78, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.deb37f08ddf50b30", scope: null, file: !45, line: 30, type: !78, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !78 = !DISubroutineType(types: !79) // CHECK:STDOUT: !79 = !{!20} // CHECK:STDOUT: !80 = !DILocation(line: 31, column: 5, scope: !77) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !45, line: 172, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !45, line: 172, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !82) // CHECK:STDOUT: !82 = !{!83} // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !81, type: !20) // CHECK:STDOUT: !84 = !DILocation(line: 173, column: 16, scope: !81) // CHECK:STDOUT: !85 = !DILocation(line: 173, column: 12, scope: !81) // CHECK:STDOUT: !86 = !DILocation(line: 173, column: 5, scope: !81) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !45, line: 175, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.fc8b3e0dc71c345e", scope: null, file: !45, line: 175, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !88) // CHECK:STDOUT: !88 = !{!89} // CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !87, type: !20) // CHECK:STDOUT: !90 = !DILocation(line: 176, column: 5, scope: !87) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8753681fdb639539", scope: null, file: !45, line: 166, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8753681fdb639539", scope: null, file: !45, line: 166, type: !46, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !92 = !{!93} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !91, type: !20) // CHECK:STDOUT: !94 = !DILocation(line: 167, column: 14, scope: !91) diff --git a/toolchain/lower/testdata/interop/cpp/reference.carbon b/toolchain/lower/testdata/interop/cpp/reference.carbon index 00c5fc0ed6cd..75fdf2fc032f 100644 --- a/toolchain/lower/testdata/interop/cpp/reference.carbon +++ b/toolchain/lower/testdata/interop/cpp/reference.carbon @@ -263,22 +263,22 @@ fn GetRefs() { // CHECK:STDOUT: attributes #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pass_references.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "pass_references.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !6, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 3, scope: !11) @@ -296,21 +296,21 @@ fn GetRefs() { // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"p1 _ZTS1C", !28, i64 0} // CHECK:STDOUT: !28 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !1, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !33 = !DILocation(line: 5, column: 7, scope: !29) // CHECK:STDOUT: !34 = !{!35, !35, i64 0} // CHECK:STDOUT: !35 = !{!"p1 int", !28, i64 0} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 25, type: !37, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !37 = !DISubroutineType(types: !38) // CHECK:STDOUT: !38 = !{null, !39} // CHECK:STDOUT: !39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !36, type: !39) // CHECK:STDOUT: !42 = !DILocation(line: 25, column: 23, scope: !36) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !44, line: 9, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !44, line: 9, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !44 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !45 = !DILocation(line: 9, column: 28, scope: !43) // CHECK:STDOUT: !46 = !DILocation(line: 9, column: 21, scope: !43) @@ -474,22 +474,22 @@ fn GetRefs() { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 18, column: 3, scope: !11) @@ -507,7 +507,7 @@ fn GetRefs() { // CHECK:STDOUT: !26 = !{!27, !27, i64 0} // CHECK:STDOUT: !27 = !{!"p1 _ZTS1C", !28, i64 0} // CHECK:STDOUT: !28 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !6, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !1, line: 5, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -516,14 +516,14 @@ fn GetRefs() { // CHECK:STDOUT: !35 = !{!36, !36, i64 0} // CHECK:STDOUT: !36 = !{!"p1 int", !28, i64 0} // CHECK:STDOUT: !37 = !{i64 4} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 26, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 26, type: !39, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !39 = !DISubroutineType(types: !40) // CHECK:STDOUT: !40 = !{null, !41} // CHECK:STDOUT: !41 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !38, type: !41) // CHECK:STDOUT: !44 = !DILocation(line: 26, column: 23, scope: !38) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !46, line: 9, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !46, line: 9, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !46 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") // CHECK:STDOUT: !47 = !DILocation(line: 9, column: 28, scope: !45) // CHECK:STDOUT: !48 = !DILocation(line: 9, column: 21, scope: !45) @@ -559,22 +559,22 @@ fn GetRefs() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_references.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "return_references.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !6, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 22, scope: !11) @@ -667,22 +667,22 @@ fn GetRefs() { // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 18, column: 22, scope: !11) diff --git a/toolchain/lower/testdata/interop/cpp/std_initializer_list.carbon b/toolchain/lower/testdata/interop/cpp/std_initializer_list.carbon index d69a020959fb..12467ffcdff4 100644 --- a/toolchain/lower/testdata/interop/cpp/std_initializer_list.carbon +++ b/toolchain/lower/testdata/interop/cpp/std_initializer_list.carbon @@ -299,43 +299,43 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_pointer_pointer.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "use_pointer_pointer.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !1, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 13, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 13, column: 42, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 3, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 12, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 13, column: 42, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !6, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !1, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !28} // CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28) // CHECK:STDOUT: !31 = !DILocation(line: 13, column: 42, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !32) // CHECK:STDOUT: !34 = !DILocation(line: 18, column: 28, scope: !32) // CHECK:STDOUT: !35 = !DILocation(line: 19, column: 3, scope: !32) @@ -348,14 +348,14 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !42 = !{i64 0, i64 8, !43, i64 8, i64 8, !43} // CHECK:STDOUT: !43 = !{!44, !44, i64 0} // CHECK:STDOUT: !44 = !{!"p1 int", !39, i64 0} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !46 = !DILocation(line: 23, column: 3, scope: !45) // CHECK:STDOUT: !47 = !DILocation(line: 23, column: 58, scope: !45) // CHECK:STDOUT: !48 = !DILocation(line: 24, column: 3, scope: !45) // CHECK:STDOUT: !49 = !DILocation(line: 22, column: 1, scope: !45) // CHECK:STDOUT: !50 = !{!51, !51, i64 0} // CHECK:STDOUT: !51 = !{!"p1 _ZTS15nontrivial_dtor", !39, i64 0} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fea30d0bd4d6e84:core.Destroy.Core", scope: null, file: !6, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fea30d0bd4d6e84:core.Destroy.Core", scope: null, file: !1, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !28) // CHECK:STDOUT: !55 = !DILocation(line: 23, column: 58, scope: !52) @@ -546,43 +546,43 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_pointer_size.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "use_pointer_size.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !6, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !1, line: 12, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 13, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 13, column: 42, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 3, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 12, column: 1, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !6, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 13, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 13, column: 42, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !6, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.412b5e0eb082e888:core.Destroy.Core", scope: null, file: !1, line: 13, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{null, !28} // CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !25, type: !28) // CHECK:STDOUT: !31 = !DILocation(line: 13, column: 42, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !6, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !1, line: 17, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !32) // CHECK:STDOUT: !34 = !DILocation(line: 18, column: 28, scope: !32) // CHECK:STDOUT: !35 = !DILocation(line: 19, column: 3, scope: !32) @@ -597,14 +597,14 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !44 = !{!"p1 int", !39, i64 0} // CHECK:STDOUT: !45 = !{!46, !46, i64 0} // CHECK:STDOUT: !46 = !{!"long", !9, i64 0} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !48 = !DILocation(line: 23, column: 3, scope: !47) // CHECK:STDOUT: !49 = !DILocation(line: 23, column: 58, scope: !47) // CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !47) // CHECK:STDOUT: !51 = !DILocation(line: 22, column: 1, scope: !47) // CHECK:STDOUT: !52 = !{!53, !53, i64 0} // CHECK:STDOUT: !53 = !{!"p1 _ZTS15nontrivial_dtor", !39, i64 0} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fea30d0bd4d6e84:core.Destroy.Core", scope: null, file: !6, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fea30d0bd4d6e84:core.Destroy.Core", scope: null, file: !1, line: 23, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !55) // CHECK:STDOUT: !55 = !{!56} // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !54, type: !28) // CHECK:STDOUT: !57 = !DILocation(line: 23, column: 58, scope: !54) diff --git a/toolchain/lower/testdata/interop/cpp/template.carbon b/toolchain/lower/testdata/interop/cpp/template.carbon index 8804fadc0871..cb1fffe48ef5 100644 --- a/toolchain/lower/testdata/interop/cpp/template.carbon +++ b/toolchain/lower/testdata/interop/cpp/template.carbon @@ -156,22 +156,22 @@ fn Call3() { // CHECK:STDOUT: attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "call.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassI32", linkageName: "_CPassI32.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -179,12 +179,12 @@ fn Call3() { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassI32Explicitly", linkageName: "_CPassI32Explicitly.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassI32Explicitly", linkageName: "_CPassI32Explicitly.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !14) // CHECK:STDOUT: !22 = !DILocation(line: 11, column: 10, scope: !19) // CHECK:STDOUT: !23 = !DILocation(line: 11, column: 3, scope: !19) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassClass", linkageName: "_CPassClass.Main", scope: null, file: !6, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "PassClass", linkageName: "_CPassClass.Main", scope: null, file: !1, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!27, !27} // CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -230,30 +230,30 @@ fn Call3() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "variadic.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "variadic.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call1", linkageName: "_CCall1.Main", scope: null, file: !6, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call1", linkageName: "_CCall1.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 3, scope: !11) // CHECK:STDOUT: !15 = !DILocation(line: 9, column: 1, scope: !11) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DILocation(line: 17, column: 3, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 15, column: 1, scope: !16) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !6, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !1, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !20 = !DILocation(line: 23, column: 3, scope: !19) // CHECK:STDOUT: !21 = !DILocation(line: 21, column: 1, scope: !19) // CHECK:STDOUT: ; ModuleID = 'variadic_thunk.carbon' @@ -352,22 +352,22 @@ fn Call3() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "variadic_thunk.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "variadic_thunk.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call1", linkageName: "_CCall1.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call1", linkageName: "_CCall1.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 12, column: 11, scope: !11) @@ -376,11 +376,11 @@ fn Call3() { // CHECK:STDOUT: !17 = !{!18, !18, i64 0} // CHECK:STDOUT: !18 = !{!"p1 _ZTS1X", !19, i64 0} // CHECK:STDOUT: !19 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !6, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !21 = !DILocation(line: 18, column: 11, scope: !20) // CHECK:STDOUT: !22 = !DILocation(line: 18, column: 3, scope: !20) // CHECK:STDOUT: !23 = !DILocation(line: 16, column: 1, scope: !20) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !1, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !25 = !DILocation(line: 24, column: 11, scope: !24) // CHECK:STDOUT: !26 = !DILocation(line: 24, column: 3, scope: !24) // CHECK:STDOUT: !27 = !DILocation(line: 22, column: 1, scope: !24) diff --git a/toolchain/lower/testdata/interop/cpp/thunks.carbon b/toolchain/lower/testdata/interop/cpp/thunks.carbon index c331ef83bf37..7baeb0229787 100644 --- a/toolchain/lower/testdata/interop/cpp/thunks.carbon +++ b/toolchain/lower/testdata/interop/cpp/thunks.carbon @@ -153,22 +153,22 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -180,14 +180,14 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !20 = !{!21, !21, i64 0} // CHECK:STDOUT: !21 = !{!"p1 _ZTS9NeedThunk", !22, i64 0} // CHECK:STDOUT: !22 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp", scope: null, file: !24, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.60e3c6e2415a2ad6.Core:NeedThunk.Cpp", scope: null, file: !24, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !24 = !DIFile(filename: "./need_thunk.h", directory: "") // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{!14, !14} // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !14) // CHECK:STDOUT: !29 = !DILocation(line: 4, column: 3, scope: !23) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp", scope: null, file: !24, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp", scope: null, file: !24, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !14) // CHECK:STDOUT: !33 = !DILocation(line: 5, column: 3, scope: !30) @@ -277,22 +277,22 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -307,7 +307,7 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !23 = !{!24, !24, i64 0} // CHECK:STDOUT: !24 = !{!"p1 _ZTS3BoxI1AE", !25, i64 0} // CHECK:STDOUT: !25 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !27 = !DIFile(filename: "./box.h", directory: "") // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{!14, !14} @@ -316,7 +316,7 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !32 = !DILocation(line: 8, column: 3, scope: !26) // CHECK:STDOUT: !33 = !{!34, !34, i64 0} // CHECK:STDOUT: !34 = !{!"p1 _ZTS3BoxI1BE", !25, i64 0} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14) // CHECK:STDOUT: !38 = !DILocation(line: 8, column: 3, scope: !35) @@ -439,22 +439,22 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !6, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !1, line: 11, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -469,7 +469,7 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !23 = !{!24, !24, i64 0} // CHECK:STDOUT: !24 = !{!"p1 _ZTS7Collide", !25, i64 0} // CHECK:STDOUT: !25 = !{!"any pointer", !9, i64 0} -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !27, line: 17, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !27, line: 17, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !27 = !DIFile(filename: "./anonymous_namespace_collision.h", directory: "") // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{!14, !14} @@ -478,7 +478,7 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !32 = !DILocation(line: 17, column: 3, scope: !26) // CHECK:STDOUT: !33 = !{!34, !34, i64 0} // CHECK:STDOUT: !34 = !{!"p1 _ZTSN12_GLOBAL__N_17CollideE", !25, i64 0} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !27, line: 8, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !36) // CHECK:STDOUT: !36 = !{!37} // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !35, type: !14) // CHECK:STDOUT: !38 = !DILocation(line: 8, column: 3, scope: !35) diff --git a/toolchain/lower/testdata/interop/cpp/void.carbon b/toolchain/lower/testdata/interop/cpp/void.carbon index 58af68e31000..3639b76079e1 100644 --- a/toolchain/lower/testdata/interop/cpp/void.carbon +++ b/toolchain/lower/testdata/interop/cpp/void.carbon @@ -250,22 +250,22 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pass.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "pass.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassVoidPtr", linkageName: "_CPassVoidPtr.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "PassVoidPtr", linkageName: "_CPassVoidPtr.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -274,49 +274,49 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 21, scope: !11) // CHECK:STDOUT: !18 = !DILocation(line: 7, column: 3, scope: !11) // CHECK:STDOUT: !19 = !DILocation(line: 6, column: 1, scope: !11) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd39a15e7d61228d:core.Destroy.Core", scope: null, file: !6, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fd39a15e7d61228d:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !21) // CHECK:STDOUT: !21 = !{!22} // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !20, type: !14) // CHECK:STDOUT: !23 = !DILocation(line: 7, column: 21, scope: !20) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.125695b29f2cf97c:core.Destroy.Core", scope: null, file: !6, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Op", linkageName: "_COp.125695b29f2cf97c:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !14) // CHECK:STDOUT: !27 = !DILocation(line: 7, column: 21, scope: !24) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.801be0c493a24c71:core.Destroy.Core", scope: null, file: !6, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.801be0c493a24c71:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !14) // CHECK:STDOUT: !31 = !DILocation(line: 7, column: 21, scope: !28) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !6, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !1, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !33 = !{!34} // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !32, type: !14) // CHECK:STDOUT: !35 = !DILocation(line: 11, column: 21, scope: !32) // CHECK:STDOUT: !36 = !DILocation(line: 11, column: 3, scope: !32) // CHECK:STDOUT: !37 = !DILocation(line: 10, column: 1, scope: !32) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !14) // CHECK:STDOUT: !41 = !DILocation(line: 15, column: 27, scope: !38) // CHECK:STDOUT: !42 = !DILocation(line: 15, column: 3, scope: !38) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 1, scope: !38) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0aac4ce7c7765bae:core.Destroy.Core", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0aac4ce7c7765bae:core.Destroy.Core", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !45) // CHECK:STDOUT: !45 = !{!46} // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !44, type: !14) // CHECK:STDOUT: !47 = !DILocation(line: 15, column: 27, scope: !44) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b8b38d4701ca7f8c:core.Destroy.Core", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b8b38d4701ca7f8c:core.Destroy.Core", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !49) // CHECK:STDOUT: !49 = !{!50} // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !48, type: !14) // CHECK:STDOUT: !51 = !DILocation(line: 15, column: 27, scope: !48) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d7b9c2d58a39f2df:core.Destroy.Core", scope: null, file: !6, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d7b9c2d58a39f2df:core.Destroy.Core", scope: null, file: !1, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !14) // CHECK:STDOUT: !55 = !DILocation(line: 15, column: 27, scope: !52) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !6, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !1, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !57) // CHECK:STDOUT: !57 = !{!58} // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !56, type: !14) // CHECK:STDOUT: !59 = !DILocation(line: 19, column: 27, scope: !56) // CHECK:STDOUT: !60 = !DILocation(line: 19, column: 3, scope: !56) // CHECK:STDOUT: !61 = !DILocation(line: 18, column: 1, scope: !56) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.52f71e11dc373f9a", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.52f71e11dc373f9a", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !66) // CHECK:STDOUT: !63 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !64 = !DISubroutineType(types: !65) // CHECK:STDOUT: !65 = !{!14, !14} @@ -324,56 +324,56 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !62, type: !14) // CHECK:STDOUT: !68 = !DILocation(line: 106, column: 12, scope: !62) // CHECK:STDOUT: !69 = !DILocation(line: 106, column: 5, scope: !62) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.ed3bde3932287ced", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.ed3bde3932287ced", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !71) // CHECK:STDOUT: !71 = !{!72} // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !70, type: !14) // CHECK:STDOUT: !73 = !DILocation(line: 106, column: 12, scope: !70) // CHECK:STDOUT: !74 = !DILocation(line: 106, column: 5, scope: !70) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0dc2e35b064d71e9", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0dc2e35b064d71e9", scope: null, file: !63, line: 105, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !76) // CHECK:STDOUT: !76 = !{!77} // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !75, type: !14) // CHECK:STDOUT: !78 = !DILocation(line: 106, column: 12, scope: !75) // CHECK:STDOUT: !79 = !DILocation(line: 106, column: 5, scope: !75) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.258ff42e9fd73c28", scope: null, file: !63, line: 80, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.258ff42e9fd73c28", scope: null, file: !63, line: 80, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !81) // CHECK:STDOUT: !81 = !{!82} // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !80, type: !14) // CHECK:STDOUT: !83 = !DILocation(line: 81, column: 12, scope: !80) // CHECK:STDOUT: !84 = !DILocation(line: 81, column: 5, scope: !80) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ff6ab29b5872c34c", scope: null, file: !63, line: 87, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ff6ab29b5872c34c", scope: null, file: !63, line: 87, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !86 = !{!87} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !85, type: !14) // CHECK:STDOUT: !88 = !DILocation(line: 88, column: 29, scope: !85) // CHECK:STDOUT: !89 = !DILocation(line: 88, column: 12, scope: !85) // CHECK:STDOUT: !90 = !DILocation(line: 88, column: 5, scope: !85) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.e316e6328124c0b3", scope: null, file: !63, line: 87, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.e316e6328124c0b3", scope: null, file: !63, line: 87, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !92 = !{!93} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !91, type: !14) // CHECK:STDOUT: !94 = !DILocation(line: 88, column: 29, scope: !91) // CHECK:STDOUT: !95 = !DILocation(line: 88, column: 12, scope: !91) // CHECK:STDOUT: !96 = !DILocation(line: 88, column: 5, scope: !91) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.258ff42e9fd73c28", scope: null, file: !63, line: 33, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !98) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.258ff42e9fd73c28", scope: null, file: !63, line: 33, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !98) // CHECK:STDOUT: !98 = !{!99} // CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !97, type: !14) // CHECK:STDOUT: !100 = !DILocation(line: 34, column: 12, scope: !97) // CHECK:STDOUT: !101 = !DILocation(line: 34, column: 5, scope: !97) -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.d035546bf1a99743.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba", scope: null, file: !103, line: 40, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.d035546bf1a99743.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba", scope: null, file: !103, line: 40, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !104) // CHECK:STDOUT: !103 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") // CHECK:STDOUT: !104 = !{!105} // CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !102, type: !14) // CHECK:STDOUT: !106 = !DILocation(line: 40, column: 3, scope: !102) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e5c5bc28e9d686cf", scope: null, file: !63, line: 33, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e5c5bc28e9d686cf", scope: null, file: !63, line: 33, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !108) // CHECK:STDOUT: !108 = !{!109} // CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !107, type: !14) // CHECK:STDOUT: !110 = !DILocation(line: 34, column: 12, scope: !107) // CHECK:STDOUT: !111 = !DILocation(line: 34, column: 5, scope: !107) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !63, line: 166, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !113) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !63, line: 166, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !113 = !{!114} // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !112, type: !14) // CHECK:STDOUT: !115 = !DILocation(line: 167, column: 14, scope: !112) // CHECK:STDOUT: !116 = !DILocation(line: 169, column: 5, scope: !112) // CHECK:STDOUT: !117 = !DILocation(line: 167, column: 18, scope: !112) // CHECK:STDOUT: !118 = !DILocation(line: 170, column: 5, scope: !112) -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !63, line: 166, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !63, line: 166, type: !64, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !120) // CHECK:STDOUT: !120 = !{!121} // CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !119, type: !14) // CHECK:STDOUT: !122 = !DILocation(line: 167, column: 14, scope: !119) @@ -409,34 +409,34 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "receive.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "receive.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !6, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !6, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !1, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{!14, !14} // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !17, type: !14) // CHECK:STDOUT: !22 = !DILocation(line: 11, column: 3, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !6, line: 14, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !1, line: 14, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !23, type: !14) // CHECK:STDOUT: !26 = !DILocation(line: 15, column: 3, scope: !23) diff --git a/toolchain/lower/testdata/let/copy_value_rep.carbon b/toolchain/lower/testdata/let/copy_value_rep.carbon index 4200e1c69fb6..c9c8033d0ccc 100644 --- a/toolchain/lower/testdata/let/copy_value_rep.carbon +++ b/toolchain/lower/testdata/let/copy_value_rep.carbon @@ -69,14 +69,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "copy_value_rep.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "copy_value_rep.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -85,20 +85,20 @@ fn Run() -> i32 { // CHECK:STDOUT: !10 = !DILocation(line: 19, column: 16, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 20, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 18, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9ba7bda1866a9bea:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9ba7bda1866a9bea:core.Destroy.Core", scope: null, file: !1, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 18, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !1, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !22) // CHECK:STDOUT: !29 = !DILocation(line: 18, column: 3, scope: !26) diff --git a/toolchain/lower/testdata/let/global.carbon b/toolchain/lower/testdata/let/global.carbon index 18e53daeb93d..a9c765796aaf 100644 --- a/toolchain/lower/testdata/let/global.carbon +++ b/toolchain/lower/testdata/let/global.carbon @@ -44,17 +44,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "global.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "global.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 19, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 0, scope: !9) diff --git a/toolchain/lower/testdata/let/local.carbon b/toolchain/lower/testdata/let/local.carbon index 856cef5296ac..911084de7eb5 100644 --- a/toolchain/lower/testdata/let/local.carbon +++ b/toolchain/lower/testdata/let/local.carbon @@ -44,14 +44,14 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "local.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "local.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -73,21 +73,21 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "symbolic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "symbolic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !3, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 1, scope: !11) diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index 69f21a8dab63..142c189c84fa 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -107,14 +107,14 @@ fn F() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "tuple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "tuple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -127,20 +127,20 @@ fn F() -> i32 { // CHECK:STDOUT: !14 = !DILocation(line: 15, column: 23, scope: !4) // CHECK:STDOUT: !15 = !DILocation(line: 17, column: 10, scope: !4) // CHECK:STDOUT: !16 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 15, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !7} // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !17, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 15, column: 3, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !26} // CHECK:STDOUT: !26 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !26) // CHECK:STDOUT: !29 = !DILocation(line: 15, column: 3, scope: !23) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !26) // CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !30) diff --git a/toolchain/lower/testdata/namespace/function.carbon b/toolchain/lower/testdata/namespace/function.carbon index be9a3411e322..369f1d3529a1 100644 --- a/toolchain/lower/testdata/namespace/function.carbon +++ b/toolchain/lower/testdata/namespace/function.carbon @@ -47,19 +47,19 @@ fn Bar() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "function.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "function.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Foo.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Foo.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 19, column: 1, scope: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 23, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 22, column: 1, scope: !10) diff --git a/toolchain/lower/testdata/namespace/namespace_run.carbon b/toolchain/lower/testdata/namespace/namespace_run.carbon index 3ac47b8c8d12..2b2b4cb3b46e 100644 --- a/toolchain/lower/testdata/namespace/namespace_run.carbon +++ b/toolchain/lower/testdata/namespace/namespace_run.carbon @@ -36,18 +36,18 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "namespace_run.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "_CRun.Foo.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "namespace_run.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "_CRun.Foo.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DISubroutineType(types: !10) // CHECK:STDOUT: !10 = !{!11} // CHECK:STDOUT: !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/namespace/nested.carbon b/toolchain/lower/testdata/namespace/nested.carbon index 924983ba486f..78a27814373d 100644 --- a/toolchain/lower/testdata/namespace/nested.carbon +++ b/toolchain/lower/testdata/namespace/nested.carbon @@ -38,17 +38,17 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Wiz", linkageName: "_CWiz.Bar.Foo.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Wiz", linkageName: "_CWiz.Bar.Foo.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Bar.Foo.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Baz", linkageName: "_CBaz.Bar.Foo.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 20, column: 3, scope: !8) // CHECK:STDOUT: !10 = !DILocation(line: 19, column: 1, scope: !8) diff --git a/toolchain/lower/testdata/operators/and.carbon b/toolchain/lower/testdata/operators/and.carbon index a89acfceea34..ea6a25e8deb4 100644 --- a/toolchain/lower/testdata/operators/and.carbon +++ b/toolchain/lower/testdata/operators/and.carbon @@ -49,21 +49,21 @@ fn And() -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "and.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "and.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 13, column: 18, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 18, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "And", linkageName: "_CAnd.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "And", linkageName: "_CAnd.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 17, column: 10, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 17, column: 18, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/operators/and_empty_block.carbon b/toolchain/lower/testdata/operators/and_empty_block.carbon index e41298d85568..c57e14d6a9ff 100644 --- a/toolchain/lower/testdata/operators/and_empty_block.carbon +++ b/toolchain/lower/testdata/operators/and_empty_block.carbon @@ -34,14 +34,14 @@ fn And(b: bool, c: bool) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "and_empty_block.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "And", linkageName: "_CAnd.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "and_empty_block.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "And", linkageName: "_CAnd.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/operators/arithmetic.carbon b/toolchain/lower/testdata/operators/arithmetic.carbon index 8facbaaffb16..ce94351bb5aa 100644 --- a/toolchain/lower/testdata/operators/arithmetic.carbon +++ b/toolchain/lower/testdata/operators/arithmetic.carbon @@ -139,14 +139,14 @@ fn div_u16(a: u16, b: u16) -> u16 { return a / b; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "arithmetic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "add_i32", linkageName: "_Cadd_i32.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "arithmetic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "add_i32", linkageName: "_Cadd_i32.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -155,7 +155,7 @@ fn div_u16(a: u16, b: u16) -> u16 { return a / b; } // CHECK:STDOUT: !10 = !DILocalVariable(arg: 2, scope: !4, type: !7) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 44, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 16, column: 37, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "add_u32", linkageName: "_Cadd_u32.Main", scope: null, file: !3, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "add_u32", linkageName: "_Cadd_u32.Main", scope: null, file: !1, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!16, !16, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -164,69 +164,69 @@ fn div_u16(a: u16, b: u16) -> u16 { return a / b; } // CHECK:STDOUT: !19 = !DILocalVariable(arg: 2, scope: !13, type: !16) // CHECK:STDOUT: !20 = !DILocation(line: 17, column: 44, scope: !13) // CHECK:STDOUT: !21 = !DILocation(line: 17, column: 37, scope: !13) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "div_i32", linkageName: "_Cdiv_i32.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "div_i32", linkageName: "_Cdiv_i32.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24, !25} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !7) // CHECK:STDOUT: !25 = !DILocalVariable(arg: 2, scope: !22, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 19, column: 44, scope: !22) // CHECK:STDOUT: !27 = !DILocation(line: 19, column: 37, scope: !22) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "div_u32", linkageName: "_Cdiv_u32.Main", scope: null, file: !3, line: 20, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "div_u32", linkageName: "_Cdiv_u32.Main", scope: null, file: !1, line: 20, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30, !31} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !16) // CHECK:STDOUT: !31 = !DILocalVariable(arg: 2, scope: !28, type: !16) // CHECK:STDOUT: !32 = !DILocation(line: 20, column: 44, scope: !28) // CHECK:STDOUT: !33 = !DILocation(line: 20, column: 37, scope: !28) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "mod_i32", linkageName: "_Cmod_i32.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "mod_i32", linkageName: "_Cmod_i32.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36, !37} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 2, scope: !34, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 22, column: 44, scope: !34) // CHECK:STDOUT: !39 = !DILocation(line: 22, column: 37, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "mod_u32", linkageName: "_Cmod_u32.Main", scope: null, file: !3, line: 23, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !41) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "mod_u32", linkageName: "_Cmod_u32.Main", scope: null, file: !1, line: 23, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !41) // CHECK:STDOUT: !41 = !{!42, !43} // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !40, type: !16) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !40, type: !16) // CHECK:STDOUT: !44 = !DILocation(line: 23, column: 44, scope: !40) // CHECK:STDOUT: !45 = !DILocation(line: 23, column: 37, scope: !40) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "mul_i32", linkageName: "_Cmul_i32.Main", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !47) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "mul_i32", linkageName: "_Cmul_i32.Main", scope: null, file: !1, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !47) // CHECK:STDOUT: !47 = !{!48, !49} // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !46, type: !7) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 2, scope: !46, type: !7) // CHECK:STDOUT: !50 = !DILocation(line: 25, column: 44, scope: !46) // CHECK:STDOUT: !51 = !DILocation(line: 25, column: 37, scope: !46) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "mul_u32", linkageName: "_Cmul_u32.Main", scope: null, file: !3, line: 26, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !53) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "mul_u32", linkageName: "_Cmul_u32.Main", scope: null, file: !1, line: 26, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !53) // CHECK:STDOUT: !53 = !{!54, !55} // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !52, type: !16) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 2, scope: !52, type: !16) // CHECK:STDOUT: !56 = !DILocation(line: 26, column: 44, scope: !52) // CHECK:STDOUT: !57 = !DILocation(line: 26, column: 37, scope: !52) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "neg_i32", linkageName: "_Cneg_i32.Main", scope: null, file: !3, line: 28, type: !59, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "neg_i32", linkageName: "_Cneg_i32.Main", scope: null, file: !1, line: 28, type: !59, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !59 = !DISubroutineType(types: !60) // CHECK:STDOUT: !60 = !{!7, !7} // CHECK:STDOUT: !61 = !{!62} // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !58, type: !7) // CHECK:STDOUT: !63 = !DILocation(line: 28, column: 36, scope: !58) // CHECK:STDOUT: !64 = !DILocation(line: 28, column: 29, scope: !58) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "neg_u32", linkageName: "_Cneg_u32.Main", scope: null, file: !3, line: 29, type: !66, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "neg_u32", linkageName: "_Cneg_u32.Main", scope: null, file: !1, line: 29, type: !66, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !68) // CHECK:STDOUT: !66 = !DISubroutineType(types: !67) // CHECK:STDOUT: !67 = !{!16, !16} // CHECK:STDOUT: !68 = !{!69} // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !65, type: !16) // CHECK:STDOUT: !70 = !DILocation(line: 29, column: 36, scope: !65) // CHECK:STDOUT: !71 = !DILocation(line: 29, column: 29, scope: !65) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "sub_i32", linkageName: "_Csub_i32.Main", scope: null, file: !3, line: 31, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !73) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "sub_i32", linkageName: "_Csub_i32.Main", scope: null, file: !1, line: 31, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !73) // CHECK:STDOUT: !73 = !{!74, !75} // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !72, type: !7) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 2, scope: !72, type: !7) // CHECK:STDOUT: !76 = !DILocation(line: 31, column: 44, scope: !72) // CHECK:STDOUT: !77 = !DILocation(line: 31, column: 37, scope: !72) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "sub_u32", linkageName: "_Csub_u32.Main", scope: null, file: !3, line: 32, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !79) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "sub_u32", linkageName: "_Csub_u32.Main", scope: null, file: !1, line: 32, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !79) // CHECK:STDOUT: !79 = !{!80, !81} // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !78, type: !16) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 2, scope: !78, type: !16) // CHECK:STDOUT: !82 = !DILocation(line: 32, column: 44, scope: !78) // CHECK:STDOUT: !83 = !DILocation(line: 32, column: 37, scope: !78) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "div_i16", linkageName: "_Cdiv_i16.Main", scope: null, file: !3, line: 36, type: !85, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !88) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "div_i16", linkageName: "_Cdiv_i16.Main", scope: null, file: !1, line: 36, type: !85, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !88) // CHECK:STDOUT: !85 = !DISubroutineType(types: !86) // CHECK:STDOUT: !86 = !{!87, !87, !87} // CHECK:STDOUT: !87 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) @@ -235,7 +235,7 @@ fn div_u16(a: u16, b: u16) -> u16 { return a / b; } // CHECK:STDOUT: !90 = !DILocalVariable(arg: 2, scope: !84, type: !87) // CHECK:STDOUT: !91 = !DILocation(line: 36, column: 44, scope: !84) // CHECK:STDOUT: !92 = !DILocation(line: 36, column: 37, scope: !84) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "div_u16", linkageName: "_Cdiv_u16.Main", scope: null, file: !3, line: 37, type: !94, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !97) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "div_u16", linkageName: "_Cdiv_u16.Main", scope: null, file: !1, line: 37, type: !94, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !97) // CHECK:STDOUT: !94 = !DISubroutineType(types: !95) // CHECK:STDOUT: !95 = !{!96, !96, !96} // CHECK:STDOUT: !96 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) diff --git a/toolchain/lower/testdata/operators/assignment.carbon b/toolchain/lower/testdata/operators/assignment.carbon index c93f0372d3a6..6abb23a4b1e9 100644 --- a/toolchain/lower/testdata/operators/assignment.carbon +++ b/toolchain/lower/testdata/operators/assignment.carbon @@ -83,14 +83,14 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "assignment.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "assignment.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -98,13 +98,13 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: !9 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 16, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 3, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 19, type: !19, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 19, type: !19, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -113,7 +113,7 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: !24 = !DILocation(line: 21, column: 3, scope: !18) // CHECK:STDOUT: !25 = !DILocation(line: 22, column: 10, scope: !18) // CHECK:STDOUT: !26 = !DILocation(line: 22, column: 3, scope: !18) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 20, type: !28, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 20, type: !28, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !28 = !DISubroutineType(types: !29) // CHECK:STDOUT: !29 = !{null, !21} // CHECK:STDOUT: !30 = !{!31} diff --git a/toolchain/lower/testdata/operators/increment.carbon b/toolchain/lower/testdata/operators/increment.carbon index cfc42ddd84a8..47062aaa18b8 100644 --- a/toolchain/lower/testdata/operators/increment.carbon +++ b/toolchain/lower/testdata/operators/increment.carbon @@ -72,33 +72,33 @@ fn IncrSigned() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "increment.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "IncrSigned", linkageName: "_CIncrSigned.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "increment.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "IncrSigned", linkageName: "_CIncrSigned.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 4, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 5, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 5, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !10, type: !13) // CHECK:STDOUT: !16 = !DILocation(line: 5, column: 3, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !18, line: 396, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !18, line: 396, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !18 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !17, type: !13) // CHECK:STDOUT: !21 = !DILocation(line: 398, column: 5, scope: !17) // CHECK:STDOUT: !22 = !DILocation(line: 396, column: 3, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !18, line: 331, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.6f9e8c1abf8bb3ea.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.44914b6ff6901661", scope: null, file: !18, line: 331, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !13, !13} // CHECK:STDOUT: !26 = !{!27, !28} @@ -106,14 +106,14 @@ fn IncrSigned() { // CHECK:STDOUT: !28 = !DILocalVariable(arg: 2, scope: !23, type: !13) // CHECK:STDOUT: !29 = !DILocation(line: 0, scope: !23) // CHECK:STDOUT: !30 = !DILocation(line: 331, column: 3, scope: !23) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !18, line: 64, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !18, line: 64, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !34) // CHECK:STDOUT: !32 = !DISubroutineType(types: !33) // CHECK:STDOUT: !33 = !{!13, !13} // CHECK:STDOUT: !34 = !{!35} // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !31, type: !13) // CHECK:STDOUT: !36 = !DILocation(line: 66, column: 17, scope: !31) // CHECK:STDOUT: !37 = !DILocation(line: 66, column: 5, scope: !31) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !18, line: 59, type: !32, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !18, line: 59, type: !32, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !38, type: !13) // CHECK:STDOUT: !41 = !DILocation(line: 59, column: 28, scope: !38) diff --git a/toolchain/lower/testdata/operators/not.carbon b/toolchain/lower/testdata/operators/not.carbon index 4ece2db071a7..77b3cdba1406 100644 --- a/toolchain/lower/testdata/operators/not.carbon +++ b/toolchain/lower/testdata/operators/not.carbon @@ -26,14 +26,14 @@ fn Not(b: bool) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "not.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Not", linkageName: "_CNot.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "not.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Not", linkageName: "_CNot.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) diff --git a/toolchain/lower/testdata/operators/or.carbon b/toolchain/lower/testdata/operators/or.carbon index bdd9b89598b5..187724dc1537 100644 --- a/toolchain/lower/testdata/operators/or.carbon +++ b/toolchain/lower/testdata/operators/or.carbon @@ -50,21 +50,21 @@ fn Or() -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "or.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "or.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 13, column: 18, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 18, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Or", linkageName: "_COr.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Or", linkageName: "_COr.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 17, column: 10, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 17, column: 17, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/operators/or_empty_block.carbon b/toolchain/lower/testdata/operators/or_empty_block.carbon index d61ff64bb182..024893ddd08e 100644 --- a/toolchain/lower/testdata/operators/or_empty_block.carbon +++ b/toolchain/lower/testdata/operators/or_empty_block.carbon @@ -35,14 +35,14 @@ fn Or(b: bool, c: bool) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "or_empty_block.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Or", linkageName: "_COr.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "or_empty_block.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Or", linkageName: "_COr.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index 6c65f4ce1bd6..1b7913753332 100644 --- a/toolchain/lower/testdata/operators/overloaded.carbon +++ b/toolchain/lower/testdata/operators/overloaded.carbon @@ -120,14 +120,14 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "overloaded.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:Negate.Core", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "overloaded.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:Negate.Core", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -137,7 +137,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: !11 = !DILocation(line: 19, column: 28, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 19, column: 12, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 19, column: 5, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:MulWith.124acaad20680602.Core", scope: null, file: !3, line: 23, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Number.Main:MulWith.124acaad20680602.Core", scope: null, file: !1, line: 23, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{!7, !7, !7} // CHECK:STDOUT: !17 = !{!18, !19} @@ -152,19 +152,19 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: !26 = !DILocation(line: 25, column: 55, scope: !14) // CHECK:STDOUT: !27 = !DILocation(line: 24, column: 12, scope: !14) // CHECK:STDOUT: !28 = !DILocation(line: 24, column: 5, scope: !14) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Calculate", linkageName: "_CCalculate.Main", scope: null, file: !3, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !30) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Calculate", linkageName: "_CCalculate.Main", scope: null, file: !1, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !30) // CHECK:STDOUT: !30 = !{!31, !32} // CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !29, type: !7) // CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !29, type: !7) // CHECK:STDOUT: !33 = !DILocation(line: 30, column: 10, scope: !29) // CHECK:STDOUT: !34 = !DILocation(line: 30, column: 3, scope: !29) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.86fb9acde14db001:core.Destroy.Core", scope: null, file: !3, line: 30, type: !36, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.86fb9acde14db001:core.Destroy.Core", scope: null, file: !1, line: 30, type: !36, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !38) // CHECK:STDOUT: !36 = !DISubroutineType(types: !37) // CHECK:STDOUT: !37 = !{null, !7} // CHECK:STDOUT: !38 = !{!39} // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !35, type: !7) // CHECK:STDOUT: !40 = !DILocation(line: 30, column: 10, scope: !35) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.494b68f9219b33ab:core.Destroy.Core", scope: null, file: !3, line: 30, type: !36, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.494b68f9219b33ab:core.Destroy.Core", scope: null, file: !1, line: 30, type: !36, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !41, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 30, column: 10, scope: !41) diff --git a/toolchain/lower/testdata/operators/string_indexing.carbon b/toolchain/lower/testdata/operators/string_indexing.carbon index b87dd0acdc94..61dd069cc6e6 100644 --- a/toolchain/lower/testdata/operators/string_indexing.carbon +++ b/toolchain/lower/testdata/operators/string_indexing.carbon @@ -44,19 +44,19 @@ fn F2(index: i64) -> char { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "string_indexing.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "string_indexing.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !8 = !DILocation(line: 15, column: 5, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F2", linkageName: "_CF2.Main", scope: null, file: !3, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F2", linkageName: "_CF2.Main", scope: null, file: !1, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{!7, !12} // CHECK:STDOUT: !12 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/packages/cross_package_call.carbon b/toolchain/lower/testdata/packages/cross_package_call.carbon index 18011b525d48..8ac95efe6cc3 100644 --- a/toolchain/lower/testdata/packages/cross_package_call.carbon +++ b/toolchain/lower/testdata/packages/cross_package_call.carbon @@ -64,25 +64,25 @@ fn CallCAsI() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.NS.A", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.NS.A", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.NS.A", scope: null, file: !3, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !12) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "G", linkageName: "_CG.NS.A", scope: null, file: !1, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) // CHECK:STDOUT: !9 = !DISubroutineType(types: !10) // CHECK:STDOUT: !10 = !{!11, !11} // CHECK:STDOUT: !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !8, type: !11) // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 26, scope: !8) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.A:I.A", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.A:I.A", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !16 = !DILocation(line: 16, column: 3, scope: !15) // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" @@ -116,24 +116,24 @@ fn CallCAsI() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 4, column: 10, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 4, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 6, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 6, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{!12} // CHECK:STDOUT: !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !13 = !DILocation(line: 6, column: 24, scope: !9) // CHECK:STDOUT: !14 = !DILocation(line: 6, column: 17, scope: !9) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallCAsI", linkageName: "_CCallCAsI.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallCAsI", linkageName: "_CCallCAsI.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !16 = !DILocation(line: 9, column: 3, scope: !15) // CHECK:STDOUT: !17 = !DILocation(line: 8, column: 1, scope: !15) diff --git a/toolchain/lower/testdata/packages/imported_package_mangle.carbon b/toolchain/lower/testdata/packages/imported_package_mangle.carbon index 7ab436c7a3b9..25fe5f51cbe9 100644 --- a/toolchain/lower/testdata/packages/imported_package_mangle.carbon +++ b/toolchain/lower/testdata/packages/imported_package_mangle.carbon @@ -100,14 +100,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.A", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.A", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 10, column: 3, scope: !4) @@ -131,20 +131,20 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 4, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !11, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !11, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !12 = !DILocation(line: 14, column: 3, scope: !10) // CHECK:STDOUT: ; ModuleID = 'c.carbon' @@ -209,22 +209,22 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "c.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.C", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "c.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.C", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 12, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.A", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.f6938aeb3cf77e6f:I.A", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 20, column: 3, scope: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.C", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "F", linkageName: "_CF.f327915d949d024f:I.C", scope: null, file: !1, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 28, column: 3, scope: !10) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.C", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "G", linkageName: "_CG.C", scope: null, file: !1, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DILocation(line: 37, column: 3, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 38, column: 3, scope: !12) // CHECK:STDOUT: !15 = !DILocation(line: 39, column: 3, scope: !12) @@ -234,12 +234,12 @@ fn G() { // CHECK:STDOUT: !19 = !DILocation(line: 45, column: 3, scope: !12) // CHECK:STDOUT: !20 = !DILocation(line: 46, column: 3, scope: !12) // CHECK:STDOUT: !21 = !DILocation(line: 35, column: 1, scope: !12) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !23, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.A.91a8a89714fbc21c", scope: null, file: !23, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !24 = !DILocation(line: 14, column: 3, scope: !22) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.A.91a8a89714fbc21c", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.A.91a8a89714fbc21c", scope: null, file: !1, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !26 = !DILocation(line: 24, column: 3, scope: !25) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.C.91a8a89714fbc21c", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "F", linkageName: "_CF.b11ad1d729c16944:I.C.91a8a89714fbc21c", scope: null, file: !1, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !28 = !DILocation(line: 32, column: 3, scope: !27) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.C.91a8a89714fbc21c", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "F", linkageName: "_CF.c2375ae0b92fd5ec:I.C.91a8a89714fbc21c", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DILocation(line: 16, column: 3, scope: !29) diff --git a/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon b/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon index 036871d0f9c0..4376394762f8 100644 --- a/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon +++ b/toolchain/lower/testdata/packages/imported_package_mangle_string.carbon @@ -58,18 +58,18 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,C,A,,!invalid,!invalid}}:I.A", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 10, column: 3, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "F", linkageName: "_CF.{array_type,{int_value,{Core.IntLiteral},1},{class_type,D,N,A,!invalid,!invalid}}:I.A", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 17, column: 3, scope: !8) // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" @@ -88,14 +88,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.B", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/packages/imported_type_completeness.carbon b/toolchain/lower/testdata/packages/imported_type_completeness.carbon index d388be07b3ed..e89ecfbb24f3 100644 --- a/toolchain/lower/testdata/packages/imported_type_completeness.carbon +++ b/toolchain/lower/testdata/packages/imported_type_completeness.carbon @@ -95,13 +95,13 @@ fn CallF() { // CHECK:STDOUT: ; ModuleID = 'require_completion_in_call.carbon' // CHECK:STDOUT: source_filename = "require_completion_in_call.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "require_completion_in_call.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "require_completion_in_call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_call.carbon' // CHECK:STDOUT: source_filename = "use_without_completion_in_call.carbon" // CHECK:STDOUT: @@ -152,19 +152,19 @@ fn CallF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use_without_completion_in_call.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_without_completion_in_call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.493fde38be547afd:core.Destroy.Core", scope: null, file: !10, line: 22, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.493fde38be547afd:core.Destroy.Core", scope: null, file: !10, line: 22, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !10 = !DIFile(filename: "require_completion_in_call.carbon", directory: "") // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} @@ -172,18 +172,18 @@ fn CallF() { // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !9, type: !13) // CHECK:STDOUT: !16 = !DILocation(line: 22, column: 4, scope: !9) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 4, scope: !17) // CHECK:STDOUT: !19 = !DILocation(line: 22, column: 4, scope: !17) // CHECK:STDOUT: !20 = !DILocation(line: 19, column: 3, scope: !17) // CHECK:STDOUT: !21 = !DILocation(line: 22, column: 3, scope: !17) // CHECK:STDOUT: !22 = !DILocation(line: 16, column: 1, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DIBasicType(name: "int", size: 123, encoding: DW_ATE_signed) // CHECK:STDOUT: !27 = !DILocation(line: 7, column: 5, scope: !23) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 11, type: !29, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.e43630e9a6c38c3f", scope: null, file: !10, line: 11, type: !29, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !29 = !DISubroutineType(types: !30) // CHECK:STDOUT: !30 = !{!31} // CHECK:STDOUT: !31 = !DIBasicType(name: "int", size: 456, encoding: DW_ATE_signed) @@ -191,13 +191,13 @@ fn CallF() { // CHECK:STDOUT: ; ModuleID = 'require_completion_in_vtable.carbon' // CHECK:STDOUT: source_filename = "require_completion_in_vtable.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_vtable.carbon' // CHECK:STDOUT: source_filename = "use_without_completion_in_vtable.carbon" // CHECK:STDOUT: @@ -219,14 +219,14 @@ fn CallF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use_without_completion_in_vtable.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_without_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 1, scope: !4) @@ -242,14 +242,14 @@ fn CallF() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -334,36 +334,36 @@ fn CallF() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use_without_completion_in_virtual_call.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_without_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 8, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 9, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 8, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 9, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 9, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !10, type: !13) // CHECK:STDOUT: !16 = !DILocation(line: 9, column: 8, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !18, line: 7, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a8f528cd70a29ff8:core.Destroy.Core", scope: null, file: !18, line: 7, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !18 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !17, type: !13) // CHECK:STDOUT: !21 = !DILocation(line: 7, column: 3, scope: !17) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.749982fce5080bfe:core.Destroy.Core", scope: null, file: !18, line: 7, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.749982fce5080bfe:core.Destroy.Core", scope: null, file: !18, line: 7, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !22, type: !13) // CHECK:STDOUT: !25 = !DILocation(line: 7, column: 3, scope: !22) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !18, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !18, line: 6, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !13) // CHECK:STDOUT: !29 = !DILocation(line: 7, column: 3, scope: !26) @@ -371,7 +371,7 @@ fn CallF() { // CHECK:STDOUT: !31 = !DILocation(line: 8, column: 3, scope: !26) // CHECK:STDOUT: !32 = !DILocation(line: 9, column: 3, scope: !26) // CHECK:STDOUT: !33 = !DILocation(line: 6, column: 1, scope: !26) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.9522ff908e97e267", scope: null, file: !35, line: 6, type: !36, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.9522ff908e97e267", scope: null, file: !35, line: 6, type: !36, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !35 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") // CHECK:STDOUT: !36 = !DISubroutineType(types: !37) // CHECK:STDOUT: !37 = !{!38, !13} @@ -379,7 +379,7 @@ fn CallF() { // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !34, type: !13) // CHECK:STDOUT: !41 = !DILocation(line: 6, column: 47, scope: !34) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.9522ff908e97e267", scope: null, file: !35, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.9522ff908e97e267", scope: null, file: !35, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !43 = !DISubroutineType(types: !44) // CHECK:STDOUT: !44 = !{!45, !13, !13} // CHECK:STDOUT: !45 = !DIBasicType(name: "int", size: 12, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/packages/private_external_mangle.carbon b/toolchain/lower/testdata/packages/private_external_mangle.carbon index d617e6232c39..5d59cdd40d3e 100644 --- a/toolchain/lower/testdata/packages/private_external_mangle.carbon +++ b/toolchain/lower/testdata/packages/private_external_mangle.carbon @@ -86,19 +86,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "private_call_a.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main.c14f6fa2d8939391", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "private_call_a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main.c14f6fa2d8939391", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.C.Main.df01d416cc5a0873", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.C.Main.df01d416cc5a0873", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 12, column: 5, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 11, column: 3, scope: !9) // CHECK:STDOUT: ; ModuleID = 'private_call_b.carbon' @@ -122,19 +122,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "private_call_b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main.d20b101f33acb508", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "private_call_b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main.d20b101f33acb508", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.C.Main.df01d416cc5a0873", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.C.Main.df01d416cc5a0873", scope: null, file: !1, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 12, column: 5, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 11, column: 3, scope: !9) // CHECK:STDOUT: ; ModuleID = 'use_a_and_b.carbon' @@ -177,25 +177,25 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use_a_and_b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_a_and_b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "CallInA", linkageName: "_CCallInA.Main.6944efcfbb6a8360", scope: null, file: !11, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "CallInA", linkageName: "_CCallInA.Main.6944efcfbb6a8360", scope: null, file: !11, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DIFile(filename: "private_call_a.carbon", directory: "") // CHECK:STDOUT: !12 = !DILocation(line: 17, column: 3, scope: !10) // CHECK:STDOUT: !13 = !DILocation(line: 18, column: 3, scope: !10) // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 1, scope: !10) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallInB", linkageName: "_CCallInB.Main.6944efcfbb6a8360", scope: null, file: !16, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "CallInB", linkageName: "_CCallInB.Main.6944efcfbb6a8360", scope: null, file: !16, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !16 = !DIFile(filename: "private_call_b.carbon", directory: "") // CHECK:STDOUT: !17 = !DILocation(line: 17, column: 3, scope: !15) // CHECK:STDOUT: !18 = !DILocation(line: 18, column: 3, scope: !15) diff --git a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon index 60a5f59a96e0..e41f4f5393cb 100644 --- a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon +++ b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon @@ -142,14 +142,14 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "owner.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Vector.OwningPackage:AddWith.f941828044620367.Core", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "owner.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Vector.OwningPackage:AddWith.f941828044620367.Core", scope: null, file: !1, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -160,7 +160,7 @@ fn CallGeneric() { // CHECK:STDOUT: !12 = !DILocation(line: 9, column: 27, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 9, column: 12, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 9, column: 5, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core", scope: null, file: !3, line: 14, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core", scope: null, file: !1, line: 14, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{!7, !7, !18} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -212,14 +212,14 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "owner.impl.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DirectInImplFile", linkageName: "_CDirectInImplFile.OwningPackage", scope: null, file: !3, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "owner.impl.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "DirectInImplFile", linkageName: "_CDirectInImplFile.OwningPackage", scope: null, file: !1, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -229,20 +229,20 @@ fn CallGeneric() { // CHECK:STDOUT: !11 = !DILocation(line: 5, column: 15, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 5, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 5, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 5, column: 15, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !7} // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !21, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 5, column: 15, scope: !21) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 5, column: 15, scope: !27) @@ -288,14 +288,14 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "direct_same_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "direct_same_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -305,20 +305,20 @@ fn CallGeneric() { // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 15, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 15, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !7} // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !21, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 7, column: 15, scope: !21) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 7, column: 15, scope: !27) @@ -351,28 +351,28 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_same_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 15, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 6, column: 15, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !21 = !DILocation(line: 6, column: 15, scope: !18) @@ -442,39 +442,39 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "indirect_same_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OwningPackage", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "indirect_same_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OwningPackage", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 15, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 23, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 7, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 7, column: 3, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !30 = !DIFile(filename: "generic_same_package.carbon", directory: "") // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{!21, !21, !21} @@ -526,14 +526,14 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "direct_different_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "direct_different_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -543,20 +543,20 @@ fn CallGeneric() { // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 15, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 10, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 15, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !7} // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !21, type: !7) // CHECK:STDOUT: !26 = !DILocation(line: 7, column: 15, scope: !21) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 7, column: 15, scope: !27) @@ -626,39 +626,39 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 29, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 51, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 7, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 7, column: 3, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !30 = !DIFile(filename: "generic_same_package.carbon", directory: "") // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{!21, !21, !21} @@ -697,28 +697,28 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "generic_different_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "generic_different_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 15, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 6, column: 15, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !18, type: !14) // CHECK:STDOUT: !21 = !DILocation(line: 6, column: 15, scope: !18) @@ -788,39 +788,39 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 15, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 7, column: 23, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f5a3a9313c43d291:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 7, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4985a3280848ef19:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 7, column: 3, scope: !25) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !33) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !30, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !33) // CHECK:STDOUT: !30 = !DIFile(filename: "generic_different_package.carbon", directory: "") // CHECK:STDOUT: !31 = !DISubroutineType(types: !32) // CHECK:STDOUT: !32 = !{!21, !21, !21} diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 0809a0495806..dac08e7cb874 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -59,14 +59,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "address_of_field.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "address_of_field.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -74,14 +74,14 @@ fn F() { // CHECK:STDOUT: !9 = !DILocation(line: 17, column: 6, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 17, column: 3, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/pointer/address_of_unused.carbon b/toolchain/lower/testdata/pointer/address_of_unused.carbon index dcfd6830ffc8..f6906825764c 100644 --- a/toolchain/lower/testdata/pointer/address_of_unused.carbon +++ b/toolchain/lower/testdata/pointer/address_of_unused.carbon @@ -40,19 +40,19 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "address_of_unused.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "address_of_unused.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null, !12} // CHECK:STDOUT: !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/pointer/basic.carbon b/toolchain/lower/testdata/pointer/basic.carbon index eb300b6ed896..d0c49ec2c748 100644 --- a/toolchain/lower/testdata/pointer/basic.carbon +++ b/toolchain/lower/testdata/pointer/basic.carbon @@ -52,14 +52,14 @@ fn F() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -68,13 +68,13 @@ fn F() -> i32 { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 14, column: 10, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 17, type: !14, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{!7} // CHECK:STDOUT: !16 = !DILocation(line: 18, column: 3, scope: !13) // CHECK:STDOUT: !17 = !DILocation(line: 19, column: 10, scope: !13) // CHECK:STDOUT: !18 = !DILocation(line: 19, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !7} // CHECK:STDOUT: !22 = !{!23} diff --git a/toolchain/lower/testdata/pointer/convert.carbon b/toolchain/lower/testdata/pointer/convert.carbon index 1c5ba6ae4638..bcdb6e74c101 100644 --- a/toolchain/lower/testdata/pointer/convert.carbon +++ b/toolchain/lower/testdata/pointer/convert.carbon @@ -25,14 +25,14 @@ fn UnsafeAs(p: i32*) -> i64* { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "UnsafeAs", linkageName: "_CUnsafeAs.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "UnsafeAs", linkageName: "_CUnsafeAs.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) diff --git a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon index db82929615e2..ae4d7c51aa37 100644 --- a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon +++ b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon @@ -48,14 +48,14 @@ fn F(p: i32**) -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "pointer_to_pointer.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pointer_to_pointer.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/primitives/bool.carbon b/toolchain/lower/testdata/primitives/bool.carbon index 8b07f549a670..cb8a0b849fb0 100644 --- a/toolchain/lower/testdata/primitives/bool.carbon +++ b/toolchain/lower/testdata/primitives/bool.carbon @@ -51,21 +51,21 @@ fn LoadStore(p: bool*, b: bool) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "bool.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "bool.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "T", linkageName: "_CT.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "T", linkageName: "_CT.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 18, column: 3, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "LoadStore", linkageName: "_CLoadStore.Main", scope: null, file: !3, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "LoadStore", linkageName: "_CLoadStore.Main", scope: null, file: !1, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7, !7, !7} // CHECK:STDOUT: !14 = !{!15, !16} diff --git a/toolchain/lower/testdata/primitives/char.carbon b/toolchain/lower/testdata/primitives/char.carbon index 5bd8aec79c32..3226b5a0bf72 100644 --- a/toolchain/lower/testdata/primitives/char.carbon +++ b/toolchain/lower/testdata/primitives/char.carbon @@ -554,14 +554,14 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "char.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.CharLike.Main:ImplicitAs.295cf9b677564c5c.Core", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "char.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.CharLike.Main:ImplicitAs.295cf9b677564c5c.Core", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) @@ -569,7 +569,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !9 = !{!10} // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 39, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !3, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !1, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7, !7} // CHECK:STDOUT: !15 = !{!16, !17} @@ -586,7 +586,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !26 = !DILocation(line: 27, column: 3, scope: !12) // CHECK:STDOUT: !27 = !DILocation(line: 28, column: 3, scope: !12) // CHECK:STDOUT: !28 = !DILocation(line: 21, column: 1, scope: !12) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ConvertConstant", linkageName: "_CConvertConstant.Main", scope: null, file: !3, line: 31, type: !30, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "ConvertConstant", linkageName: "_CConvertConstant.Main", scope: null, file: !1, line: 31, type: !30, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{null} // CHECK:STDOUT: !32 = !DILocation(line: 32, column: 3, scope: !29) @@ -600,7 +600,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !40 = !DILocation(line: 36, column: 3, scope: !29) // CHECK:STDOUT: !41 = !DILocation(line: 37, column: 3, scope: !29) // CHECK:STDOUT: !42 = !DILocation(line: 31, column: 1, scope: !29) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "CompareCharChar", linkageName: "_CCompareCharChar.Main", scope: null, file: !3, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "CompareCharChar", linkageName: "_CCompareCharChar.Main", scope: null, file: !1, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !44 = !{!45, !46} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !43, type: !7) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 2, scope: !43, type: !7) @@ -617,7 +617,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !57 = !DILocation(line: 46, column: 11, scope: !43) // CHECK:STDOUT: !58 = !DILocation(line: 46, column: 3, scope: !43) // CHECK:STDOUT: !59 = !DILocation(line: 40, column: 1, scope: !43) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "CompareCharCharLike", linkageName: "_CCompareCharCharLike.Main", scope: null, file: !3, line: 49, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "CompareCharCharLike", linkageName: "_CCompareCharCharLike.Main", scope: null, file: !1, line: 49, type: !61, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !63) // CHECK:STDOUT: !61 = !DISubroutineType(types: !62) // CHECK:STDOUT: !62 = !{null, !7, !8} // CHECK:STDOUT: !63 = !{!64, !65} @@ -654,7 +654,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !94 = !DILocation(line: 62, column: 11, scope: !60) // CHECK:STDOUT: !95 = !DILocation(line: 62, column: 3, scope: !60) // CHECK:STDOUT: !96 = !DILocation(line: 49, column: 1, scope: !60) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubCharChar", linkageName: "_CSubCharChar.Main", scope: null, file: !3, line: 65, type: !61, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !98) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubCharChar", linkageName: "_CSubCharChar.Main", scope: null, file: !1, line: 65, type: !61, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !98) // CHECK:STDOUT: !98 = !{!99, !100} // CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !97, type: !7) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !97, type: !8) @@ -666,7 +666,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !106 = !DILocation(line: 68, column: 11, scope: !97) // CHECK:STDOUT: !107 = !DILocation(line: 68, column: 3, scope: !97) // CHECK:STDOUT: !108 = !DILocation(line: 65, column: 1, scope: !97) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "AddSubInt8", linkageName: "_CAddSubInt8.Main", scope: null, file: !3, line: 71, type: !110, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !113) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "AddSubInt8", linkageName: "_CAddSubInt8.Main", scope: null, file: !1, line: 71, type: !110, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !113) // CHECK:STDOUT: !110 = !DISubroutineType(types: !111) // CHECK:STDOUT: !111 = !{null, !7, !112} // CHECK:STDOUT: !112 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) @@ -680,7 +680,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !120 = !DILocation(line: 74, column: 11, scope: !109) // CHECK:STDOUT: !121 = !DILocation(line: 74, column: 3, scope: !109) // CHECK:STDOUT: !122 = !DILocation(line: 71, column: 1, scope: !109) -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "AddSubInt16", linkageName: "_CAddSubInt16.Main", scope: null, file: !3, line: 77, type: !124, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !127) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "AddSubInt16", linkageName: "_CAddSubInt16.Main", scope: null, file: !1, line: 77, type: !124, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !127) // CHECK:STDOUT: !124 = !DISubroutineType(types: !125) // CHECK:STDOUT: !125 = !{null, !7, !126} // CHECK:STDOUT: !126 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) @@ -694,7 +694,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !134 = !DILocation(line: 80, column: 11, scope: !123) // CHECK:STDOUT: !135 = !DILocation(line: 80, column: 3, scope: !123) // CHECK:STDOUT: !136 = !DILocation(line: 77, column: 1, scope: !123) -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "AddSubInt32", linkageName: "_CAddSubInt32.Main", scope: null, file: !3, line: 83, type: !138, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !141) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "AddSubInt32", linkageName: "_CAddSubInt32.Main", scope: null, file: !1, line: 83, type: !138, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !141) // CHECK:STDOUT: !138 = !DISubroutineType(types: !139) // CHECK:STDOUT: !139 = !{null, !7, !140} // CHECK:STDOUT: !140 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -708,7 +708,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !148 = !DILocation(line: 86, column: 11, scope: !137) // CHECK:STDOUT: !149 = !DILocation(line: 86, column: 3, scope: !137) // CHECK:STDOUT: !150 = !DILocation(line: 83, column: 1, scope: !137) -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "AddSubUInt8", linkageName: "_CAddSubUInt8.Main", scope: null, file: !3, line: 89, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !152) +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "AddSubUInt8", linkageName: "_CAddSubUInt8.Main", scope: null, file: !1, line: 89, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !152) // CHECK:STDOUT: !152 = !{!153, !154} // CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !151, type: !7) // CHECK:STDOUT: !154 = !DILocalVariable(arg: 2, scope: !151, type: !7) @@ -719,7 +719,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !159 = !DILocation(line: 92, column: 11, scope: !151) // CHECK:STDOUT: !160 = !DILocation(line: 92, column: 3, scope: !151) // CHECK:STDOUT: !161 = !DILocation(line: 89, column: 1, scope: !151) -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "AddSubUInt16", linkageName: "_CAddSubUInt16.Main", scope: null, file: !3, line: 95, type: !163, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !166) +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "AddSubUInt16", linkageName: "_CAddSubUInt16.Main", scope: null, file: !1, line: 95, type: !163, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !166) // CHECK:STDOUT: !163 = !DISubroutineType(types: !164) // CHECK:STDOUT: !164 = !{null, !7, !165} // CHECK:STDOUT: !165 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) @@ -733,7 +733,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !173 = !DILocation(line: 98, column: 11, scope: !162) // CHECK:STDOUT: !174 = !DILocation(line: 98, column: 3, scope: !162) // CHECK:STDOUT: !175 = !DILocation(line: 95, column: 1, scope: !162) -// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "AddSubUInt32", linkageName: "_CAddSubUInt32.Main", scope: null, file: !3, line: 101, type: !177, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !180) +// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "AddSubUInt32", linkageName: "_CAddSubUInt32.Main", scope: null, file: !1, line: 101, type: !177, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !180) // CHECK:STDOUT: !177 = !DISubroutineType(types: !178) // CHECK:STDOUT: !178 = !{null, !7, !179} // CHECK:STDOUT: !179 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -747,56 +747,56 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !187 = !DILocation(line: 104, column: 11, scope: !176) // CHECK:STDOUT: !188 = !DILocation(line: 104, column: 3, scope: !176) // CHECK:STDOUT: !189 = !DILocation(line: 101, column: 1, scope: !176) -// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.15688e19507865c6", scope: null, file: !3, line: 19, type: !191, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !193) +// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.15688e19507865c6", scope: null, file: !1, line: 19, type: !191, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !193) // CHECK:STDOUT: !191 = !DISubroutineType(types: !192) // CHECK:STDOUT: !192 = !{null, !7} // CHECK:STDOUT: !193 = !{!194} // CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !190, type: !7) // CHECK:STDOUT: !195 = !DILocation(line: 19, column: 1, scope: !190) -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.dbe0a954f4d47a23", scope: null, file: !197, line: 42, type: !198, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !200) +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.dbe0a954f4d47a23", scope: null, file: !197, line: 42, type: !198, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !200) // CHECK:STDOUT: !197 = !DIFile(filename: "{{.*}}/prelude/types/char.carbon", directory: "") // CHECK:STDOUT: !198 = !DISubroutineType(types: !199) // CHECK:STDOUT: !199 = !{!165, !7} // CHECK:STDOUT: !200 = !{!201} // CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !196, type: !7) // CHECK:STDOUT: !202 = !DILocation(line: 43, column: 5, scope: !196) -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.147e0bd019a31663", scope: null, file: !3, line: 19, type: !204, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !206) +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.147e0bd019a31663", scope: null, file: !1, line: 19, type: !204, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !206) // CHECK:STDOUT: !204 = !DISubroutineType(types: !205) // CHECK:STDOUT: !205 = !{null, !165} // CHECK:STDOUT: !206 = !{!207} // CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !203, type: !165) // CHECK:STDOUT: !208 = !DILocation(line: 19, column: 1, scope: !203) -// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.691b43fb97812586", scope: null, file: !197, line: 42, type: !210, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !212) +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.691b43fb97812586", scope: null, file: !197, line: 42, type: !210, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !212) // CHECK:STDOUT: !210 = !DISubroutineType(types: !211) // CHECK:STDOUT: !211 = !{!179, !7} // CHECK:STDOUT: !212 = !{!213} // CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !209, type: !7) // CHECK:STDOUT: !214 = !DILocation(line: 43, column: 5, scope: !209) -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.eadca4a969cf6f21", scope: null, file: !3, line: 19, type: !216, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !218) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.eadca4a969cf6f21", scope: null, file: !1, line: 19, type: !216, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !218) // CHECK:STDOUT: !216 = !DISubroutineType(types: !217) // CHECK:STDOUT: !217 = !{null, !179} // CHECK:STDOUT: !218 = !{!219} // CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !215, type: !179) // CHECK:STDOUT: !220 = !DILocation(line: 19, column: 1, scope: !215) -// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.48e83ee0f3ef2ee8", scope: null, file: !197, line: 42, type: !222, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !224) +// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.48e83ee0f3ef2ee8", scope: null, file: !197, line: 42, type: !222, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !224) // CHECK:STDOUT: !222 = !DISubroutineType(types: !223) // CHECK:STDOUT: !223 = !{!126, !7} // CHECK:STDOUT: !224 = !{!225} // CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !221, type: !7) // CHECK:STDOUT: !226 = !DILocation(line: 43, column: 5, scope: !221) -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.8da8ddbe24cfd39a", scope: null, file: !197, line: 42, type: !228, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !230) +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.8da8ddbe24cfd39a", scope: null, file: !197, line: 42, type: !228, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !230) // CHECK:STDOUT: !228 = !DISubroutineType(types: !229) // CHECK:STDOUT: !229 = !{!140, !7} // CHECK:STDOUT: !230 = !{!231} // CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !227, type: !7) // CHECK:STDOUT: !232 = !DILocation(line: 43, column: 5, scope: !227) -// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.a4c7fafe8a72cac4", scope: null, file: !3, line: 19, type: !234, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !236) +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.a4c7fafe8a72cac4", scope: null, file: !1, line: 19, type: !234, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !236) // CHECK:STDOUT: !234 = !DISubroutineType(types: !235) // CHECK:STDOUT: !235 = !{null, !8} // CHECK:STDOUT: !236 = !{!237} // CHECK:STDOUT: !237 = !DILocalVariable(arg: 1, scope: !233, type: !8) // CHECK:STDOUT: !238 = !DILocation(line: 19, column: 1, scope: !233) -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.7c3e388e0087434a.Core.ab8531ca840d1501", scope: null, file: !197, line: 129, type: !240, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !242) +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.7c3e388e0087434a.Core.ab8531ca840d1501", scope: null, file: !197, line: 129, type: !240, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !242) // CHECK:STDOUT: !240 = !DISubroutineType(types: !241) // CHECK:STDOUT: !241 = !{!140, !7, !7} // CHECK:STDOUT: !242 = !{!243, !244} @@ -806,7 +806,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !246 = !DILocation(line: 130, column: 29, scope: !239) // CHECK:STDOUT: !247 = !DILocation(line: 130, column: 12, scope: !239) // CHECK:STDOUT: !248 = !DILocation(line: 130, column: 5, scope: !239) -// CHECK:STDOUT: !249 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b27934686504f96c:SubWith.295cf9b677564c5c.Core.ab8531ca840d1501", scope: null, file: !197, line: 123, type: !240, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !250) +// CHECK:STDOUT: !249 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b27934686504f96c:SubWith.295cf9b677564c5c.Core.ab8531ca840d1501", scope: null, file: !197, line: 123, type: !240, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !250) // CHECK:STDOUT: !250 = !{!251, !252} // CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !249, type: !7) // CHECK:STDOUT: !252 = !DILocalVariable(arg: 2, scope: !249, type: !7) @@ -814,7 +814,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !254 = !DILocation(line: 124, column: 29, scope: !249) // CHECK:STDOUT: !255 = !DILocation(line: 124, column: 12, scope: !249) // CHECK:STDOUT: !256 = !DILocation(line: 124, column: 5, scope: !249) -// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.852ed75bdc952b41", scope: null, file: !197, line: 94, type: !258, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !260) +// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.852ed75bdc952b41", scope: null, file: !197, line: 94, type: !258, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !260) // CHECK:STDOUT: !258 = !DISubroutineType(types: !259) // CHECK:STDOUT: !259 = !{!7, !7, !112} // CHECK:STDOUT: !260 = !{!261, !262} @@ -822,7 +822,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !262 = !DILocalVariable(arg: 2, scope: !257, type: !112) // CHECK:STDOUT: !263 = !DILocation(line: 96, column: 13, scope: !257) // CHECK:STDOUT: !264 = !DILocation(line: 96, column: 5, scope: !257) -// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.852ed75bdc952b41", scope: null, file: !197, line: 102, type: !266, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !268) +// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.852ed75bdc952b41", scope: null, file: !197, line: 102, type: !266, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !268) // CHECK:STDOUT: !266 = !DISubroutineType(types: !267) // CHECK:STDOUT: !267 = !{!7, !112, !7} // CHECK:STDOUT: !268 = !{!269, !270} @@ -830,13 +830,13 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !270 = !DILocalVariable(arg: 2, scope: !265, type: !7) // CHECK:STDOUT: !271 = !DILocation(line: 104, column: 13, scope: !265) // CHECK:STDOUT: !272 = !DILocation(line: 104, column: 5, scope: !265) -// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.852ed75bdc952b41", scope: null, file: !197, line: 110, type: !258, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !274) +// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.852ed75bdc952b41", scope: null, file: !197, line: 110, type: !258, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !274) // CHECK:STDOUT: !274 = !{!275, !276} // CHECK:STDOUT: !275 = !DILocalVariable(arg: 1, scope: !273, type: !7) // CHECK:STDOUT: !276 = !DILocalVariable(arg: 2, scope: !273, type: !112) // CHECK:STDOUT: !277 = !DILocation(line: 112, column: 13, scope: !273) // CHECK:STDOUT: !278 = !DILocation(line: 112, column: 5, scope: !273) -// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.4de33f895b808f69", scope: null, file: !197, line: 94, type: !280, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !282) +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.4de33f895b808f69", scope: null, file: !197, line: 94, type: !280, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !282) // CHECK:STDOUT: !280 = !DISubroutineType(types: !281) // CHECK:STDOUT: !281 = !{!7, !7, !126} // CHECK:STDOUT: !282 = !{!283, !284} @@ -845,7 +845,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !285 = !DILocation(line: 96, column: 29, scope: !279) // CHECK:STDOUT: !286 = !DILocation(line: 96, column: 13, scope: !279) // CHECK:STDOUT: !287 = !DILocation(line: 96, column: 5, scope: !279) -// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.4de33f895b808f69", scope: null, file: !197, line: 102, type: !289, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !291) +// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.4de33f895b808f69", scope: null, file: !197, line: 102, type: !289, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !291) // CHECK:STDOUT: !289 = !DISubroutineType(types: !290) // CHECK:STDOUT: !290 = !{!7, !126, !7} // CHECK:STDOUT: !291 = !{!292, !293} @@ -854,14 +854,14 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !294 = !DILocation(line: 104, column: 14, scope: !288) // CHECK:STDOUT: !295 = !DILocation(line: 104, column: 13, scope: !288) // CHECK:STDOUT: !296 = !DILocation(line: 104, column: 5, scope: !288) -// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.4de33f895b808f69", scope: null, file: !197, line: 110, type: !280, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !298) +// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.4de33f895b808f69", scope: null, file: !197, line: 110, type: !280, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !298) // CHECK:STDOUT: !298 = !{!299, !300} // CHECK:STDOUT: !299 = !DILocalVariable(arg: 1, scope: !297, type: !7) // CHECK:STDOUT: !300 = !DILocalVariable(arg: 2, scope: !297, type: !126) // CHECK:STDOUT: !301 = !DILocation(line: 112, column: 29, scope: !297) // CHECK:STDOUT: !302 = !DILocation(line: 112, column: 13, scope: !297) // CHECK:STDOUT: !303 = !DILocation(line: 112, column: 5, scope: !297) -// CHECK:STDOUT: !304 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 94, type: !305, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !307) +// CHECK:STDOUT: !304 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 94, type: !305, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !307) // CHECK:STDOUT: !305 = !DISubroutineType(types: !306) // CHECK:STDOUT: !306 = !{!7, !7, !140} // CHECK:STDOUT: !307 = !{!308, !309} @@ -870,7 +870,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !310 = !DILocation(line: 96, column: 29, scope: !304) // CHECK:STDOUT: !311 = !DILocation(line: 96, column: 13, scope: !304) // CHECK:STDOUT: !312 = !DILocation(line: 96, column: 5, scope: !304) -// CHECK:STDOUT: !313 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 102, type: !314, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !316) +// CHECK:STDOUT: !313 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 102, type: !314, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !316) // CHECK:STDOUT: !314 = !DISubroutineType(types: !315) // CHECK:STDOUT: !315 = !{!7, !140, !7} // CHECK:STDOUT: !316 = !{!317, !318} @@ -879,14 +879,14 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !319 = !DILocation(line: 104, column: 14, scope: !313) // CHECK:STDOUT: !320 = !DILocation(line: 104, column: 13, scope: !313) // CHECK:STDOUT: !321 = !DILocation(line: 104, column: 5, scope: !313) -// CHECK:STDOUT: !322 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 110, type: !305, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !323) +// CHECK:STDOUT: !322 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.ae42bf297a1ee9b6", scope: null, file: !197, line: 110, type: !305, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !323) // CHECK:STDOUT: !323 = !{!324, !325} // CHECK:STDOUT: !324 = !DILocalVariable(arg: 1, scope: !322, type: !7) // CHECK:STDOUT: !325 = !DILocalVariable(arg: 2, scope: !322, type: !140) // CHECK:STDOUT: !326 = !DILocation(line: 112, column: 29, scope: !322) // CHECK:STDOUT: !327 = !DILocation(line: 112, column: 13, scope: !322) // CHECK:STDOUT: !328 = !DILocation(line: 112, column: 5, scope: !322) -// CHECK:STDOUT: !329 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 94, type: !330, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !332) +// CHECK:STDOUT: !329 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 94, type: !330, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !332) // CHECK:STDOUT: !330 = !DISubroutineType(types: !331) // CHECK:STDOUT: !331 = !{!7, !7, !7} // CHECK:STDOUT: !332 = !{!333, !334} @@ -894,19 +894,19 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !334 = !DILocalVariable(arg: 2, scope: !329, type: !7) // CHECK:STDOUT: !335 = !DILocation(line: 96, column: 13, scope: !329) // CHECK:STDOUT: !336 = !DILocation(line: 96, column: 5, scope: !329) -// CHECK:STDOUT: !337 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 102, type: !330, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !338) +// CHECK:STDOUT: !337 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 102, type: !330, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !338) // CHECK:STDOUT: !338 = !{!339, !340} // CHECK:STDOUT: !339 = !DILocalVariable(arg: 1, scope: !337, type: !7) // CHECK:STDOUT: !340 = !DILocalVariable(arg: 2, scope: !337, type: !7) // CHECK:STDOUT: !341 = !DILocation(line: 104, column: 13, scope: !337) // CHECK:STDOUT: !342 = !DILocation(line: 104, column: 5, scope: !337) -// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 110, type: !330, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !344) +// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.3ff23939bf07ad5f", scope: null, file: !197, line: 110, type: !330, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !344) // CHECK:STDOUT: !344 = !{!345, !346} // CHECK:STDOUT: !345 = !DILocalVariable(arg: 1, scope: !343, type: !7) // CHECK:STDOUT: !346 = !DILocalVariable(arg: 2, scope: !343, type: !7) // CHECK:STDOUT: !347 = !DILocation(line: 112, column: 13, scope: !343) // CHECK:STDOUT: !348 = !DILocation(line: 112, column: 5, scope: !343) -// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.a374c478e4368fa7", scope: null, file: !197, line: 94, type: !350, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !352) +// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.a374c478e4368fa7", scope: null, file: !197, line: 94, type: !350, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !352) // CHECK:STDOUT: !350 = !DISubroutineType(types: !351) // CHECK:STDOUT: !351 = !{!7, !7, !165} // CHECK:STDOUT: !352 = !{!353, !354} @@ -915,7 +915,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !355 = !DILocation(line: 96, column: 29, scope: !349) // CHECK:STDOUT: !356 = !DILocation(line: 96, column: 13, scope: !349) // CHECK:STDOUT: !357 = !DILocation(line: 96, column: 5, scope: !349) -// CHECK:STDOUT: !358 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.a374c478e4368fa7", scope: null, file: !197, line: 102, type: !359, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !361) +// CHECK:STDOUT: !358 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.a374c478e4368fa7", scope: null, file: !197, line: 102, type: !359, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !361) // CHECK:STDOUT: !359 = !DISubroutineType(types: !360) // CHECK:STDOUT: !360 = !{!7, !165, !7} // CHECK:STDOUT: !361 = !{!362, !363} @@ -924,14 +924,14 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !364 = !DILocation(line: 104, column: 14, scope: !358) // CHECK:STDOUT: !365 = !DILocation(line: 104, column: 13, scope: !358) // CHECK:STDOUT: !366 = !DILocation(line: 104, column: 5, scope: !358) -// CHECK:STDOUT: !367 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.a374c478e4368fa7", scope: null, file: !197, line: 110, type: !350, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !368) +// CHECK:STDOUT: !367 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.a374c478e4368fa7", scope: null, file: !197, line: 110, type: !350, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !368) // CHECK:STDOUT: !368 = !{!369, !370} // CHECK:STDOUT: !369 = !DILocalVariable(arg: 1, scope: !367, type: !7) // CHECK:STDOUT: !370 = !DILocalVariable(arg: 2, scope: !367, type: !165) // CHECK:STDOUT: !371 = !DILocation(line: 112, column: 29, scope: !367) // CHECK:STDOUT: !372 = !DILocation(line: 112, column: 13, scope: !367) // CHECK:STDOUT: !373 = !DILocation(line: 112, column: 5, scope: !367) -// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.bca5dfe49de51c76", scope: null, file: !197, line: 94, type: !375, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !377) +// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:AddWith.d9344a06b22b3b94.Core.bca5dfe49de51c76", scope: null, file: !197, line: 94, type: !375, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !377) // CHECK:STDOUT: !375 = !DISubroutineType(types: !376) // CHECK:STDOUT: !376 = !{!7, !7, !179} // CHECK:STDOUT: !377 = !{!378, !379} @@ -940,7 +940,7 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !380 = !DILocation(line: 96, column: 29, scope: !374) // CHECK:STDOUT: !381 = !DILocation(line: 96, column: 13, scope: !374) // CHECK:STDOUT: !382 = !DILocation(line: 96, column: 5, scope: !374) -// CHECK:STDOUT: !383 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.bca5dfe49de51c76", scope: null, file: !197, line: 102, type: !384, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !386) +// CHECK:STDOUT: !383 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd9948a9ef8c6e5:AddWith.295cf9b677564c5c.Core.bca5dfe49de51c76", scope: null, file: !197, line: 102, type: !384, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !386) // CHECK:STDOUT: !384 = !DISubroutineType(types: !385) // CHECK:STDOUT: !385 = !{!7, !179, !7} // CHECK:STDOUT: !386 = !{!387, !388} @@ -949,63 +949,63 @@ fn AddSubUInt32(c: char, i: u32) { // CHECK:STDOUT: !389 = !DILocation(line: 104, column: 14, scope: !383) // CHECK:STDOUT: !390 = !DILocation(line: 104, column: 13, scope: !383) // CHECK:STDOUT: !391 = !DILocation(line: 104, column: 5, scope: !383) -// CHECK:STDOUT: !392 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.bca5dfe49de51c76", scope: null, file: !197, line: 110, type: !375, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !393) +// CHECK:STDOUT: !392 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.d9344a06b22b3b94.Core.bca5dfe49de51c76", scope: null, file: !197, line: 110, type: !375, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !393) // CHECK:STDOUT: !393 = !{!394, !395} // CHECK:STDOUT: !394 = !DILocalVariable(arg: 1, scope: !392, type: !7) // CHECK:STDOUT: !395 = !DILocalVariable(arg: 2, scope: !392, type: !179) // CHECK:STDOUT: !396 = !DILocation(line: 112, column: 29, scope: !392) // CHECK:STDOUT: !397 = !DILocation(line: 112, column: 13, scope: !392) // CHECK:STDOUT: !398 = !DILocation(line: 112, column: 5, scope: !392) -// CHECK:STDOUT: !399 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b906c5940adce8f0", scope: null, file: !400, line: 88, type: !198, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !401) +// CHECK:STDOUT: !399 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b906c5940adce8f0", scope: null, file: !400, line: 88, type: !198, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !401) // CHECK:STDOUT: !400 = !DIFile(filename: "{{.*}}/prelude/types/uint.carbon", directory: "") // CHECK:STDOUT: !401 = !{!402} // CHECK:STDOUT: !402 = !DILocalVariable(arg: 1, scope: !399, type: !7) // CHECK:STDOUT: !403 = !DILocation(line: 89, column: 12, scope: !399) // CHECK:STDOUT: !404 = !DILocation(line: 89, column: 5, scope: !399) -// CHECK:STDOUT: !405 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dbd6eca082a732b7", scope: null, file: !400, line: 88, type: !210, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !406) +// CHECK:STDOUT: !405 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dbd6eca082a732b7", scope: null, file: !400, line: 88, type: !210, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !406) // CHECK:STDOUT: !406 = !{!407} // CHECK:STDOUT: !407 = !DILocalVariable(arg: 1, scope: !405, type: !7) // CHECK:STDOUT: !408 = !DILocation(line: 89, column: 12, scope: !405) // CHECK:STDOUT: !409 = !DILocation(line: 89, column: 5, scope: !405) -// CHECK:STDOUT: !410 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dc14f658d346b3e8", scope: null, file: !400, line: 88, type: !222, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !411) +// CHECK:STDOUT: !410 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dc14f658d346b3e8", scope: null, file: !400, line: 88, type: !222, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !411) // CHECK:STDOUT: !411 = !{!412} // CHECK:STDOUT: !412 = !DILocalVariable(arg: 1, scope: !410, type: !7) // CHECK:STDOUT: !413 = !DILocation(line: 89, column: 12, scope: !410) // CHECK:STDOUT: !414 = !DILocation(line: 89, column: 5, scope: !410) -// CHECK:STDOUT: !415 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !400, line: 88, type: !228, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !416) +// CHECK:STDOUT: !415 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !400, line: 88, type: !228, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !416) // CHECK:STDOUT: !416 = !{!417} // CHECK:STDOUT: !417 = !DILocalVariable(arg: 1, scope: !415, type: !7) // CHECK:STDOUT: !418 = !DILocation(line: 89, column: 12, scope: !415) // CHECK:STDOUT: !419 = !DILocation(line: 89, column: 5, scope: !415) -// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.db6d5218df1134ee", scope: null, file: !197, line: 42, type: !228, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !421) +// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.db6d5218df1134ee", scope: null, file: !197, line: 42, type: !228, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !421) // CHECK:STDOUT: !421 = !{!422} // CHECK:STDOUT: !422 = !DILocalVariable(arg: 1, scope: !420, type: !7) // CHECK:STDOUT: !423 = !DILocation(line: 43, column: 5, scope: !420) -// CHECK:STDOUT: !424 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.c3acaf94968d88d2", scope: null, file: !400, line: 72, type: !198, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !425) +// CHECK:STDOUT: !424 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.c3acaf94968d88d2", scope: null, file: !400, line: 72, type: !198, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !425) // CHECK:STDOUT: !425 = !{!426} // CHECK:STDOUT: !426 = !DILocalVariable(arg: 1, scope: !424, type: !7) // CHECK:STDOUT: !427 = !DILocation(line: 74, column: 17, scope: !424) // CHECK:STDOUT: !428 = !DILocation(line: 74, column: 12, scope: !424) // CHECK:STDOUT: !429 = !DILocation(line: 74, column: 5, scope: !424) -// CHECK:STDOUT: !430 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.d93106ca8c7912cd", scope: null, file: !400, line: 72, type: !210, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !431) +// CHECK:STDOUT: !430 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.d93106ca8c7912cd", scope: null, file: !400, line: 72, type: !210, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !431) // CHECK:STDOUT: !431 = !{!432} // CHECK:STDOUT: !432 = !DILocalVariable(arg: 1, scope: !430, type: !7) // CHECK:STDOUT: !433 = !DILocation(line: 74, column: 17, scope: !430) // CHECK:STDOUT: !434 = !DILocation(line: 74, column: 12, scope: !430) // CHECK:STDOUT: !435 = !DILocation(line: 74, column: 5, scope: !430) -// CHECK:STDOUT: !436 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.8d84eea89906cfec", scope: null, file: !400, line: 80, type: !222, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !437) +// CHECK:STDOUT: !436 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.8d84eea89906cfec", scope: null, file: !400, line: 80, type: !222, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !437) // CHECK:STDOUT: !437 = !{!438} // CHECK:STDOUT: !438 = !DILocalVariable(arg: 1, scope: !436, type: !7) // CHECK:STDOUT: !439 = !DILocation(line: 82, column: 17, scope: !436) // CHECK:STDOUT: !440 = !DILocation(line: 82, column: 12, scope: !436) // CHECK:STDOUT: !441 = !DILocation(line: 82, column: 5, scope: !436) -// CHECK:STDOUT: !442 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !400, line: 80, type: !228, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !443) +// CHECK:STDOUT: !442 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !400, line: 80, type: !228, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !443) // CHECK:STDOUT: !443 = !{!444} // CHECK:STDOUT: !444 = !DILocalVariable(arg: 1, scope: !442, type: !7) // CHECK:STDOUT: !445 = !DILocation(line: 82, column: 17, scope: !442) // CHECK:STDOUT: !446 = !DILocation(line: 82, column: 12, scope: !442) // CHECK:STDOUT: !447 = !DILocation(line: 82, column: 5, scope: !442) -// CHECK:STDOUT: !448 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !400, line: 60, type: !449, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !451) +// CHECK:STDOUT: !448 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !400, line: 60, type: !449, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !451) // CHECK:STDOUT: !449 = !DISubroutineType(types: !450) // CHECK:STDOUT: !450 = !{!7, !7} // CHECK:STDOUT: !451 = !{!452} diff --git a/toolchain/lower/testdata/primitives/char_literals.carbon b/toolchain/lower/testdata/primitives/char_literals.carbon index ec1451841cb0..d8a3b0b6e45e 100644 --- a/toolchain/lower/testdata/primitives/char_literals.carbon +++ b/toolchain/lower/testdata/primitives/char_literals.carbon @@ -250,14 +250,14 @@ fn AddSubInt8() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "char_literals.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.CharLike.Main:ImplicitAs.295cf9b677564c5c.Core", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "char_literals.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.CharLike.Main:ImplicitAs.295cf9b677564c5c.Core", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) @@ -265,7 +265,7 @@ fn AddSubInt8() { // CHECK:STDOUT: !9 = !{!10} // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 39, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !3, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !1, line: 21, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null} // CHECK:STDOUT: !15 = !DILocation(line: 22, column: 3, scope: !12) @@ -275,14 +275,14 @@ fn AddSubInt8() { // CHECK:STDOUT: !19 = !DILocation(line: 26, column: 3, scope: !12) // CHECK:STDOUT: !20 = !DILocation(line: 27, column: 3, scope: !12) // CHECK:STDOUT: !21 = !DILocation(line: 21, column: 1, scope: !12) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "ConvertConstant", linkageName: "_CConvertConstant.Main", scope: null, file: !3, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "ConvertConstant", linkageName: "_CConvertConstant.Main", scope: null, file: !1, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !23 = !DILocation(line: 31, column: 3, scope: !22) // CHECK:STDOUT: !24 = !DILocation(line: 32, column: 3, scope: !22) // CHECK:STDOUT: !25 = !DILocation(line: 33, column: 3, scope: !22) // CHECK:STDOUT: !26 = !DILocation(line: 34, column: 3, scope: !22) // CHECK:STDOUT: !27 = !DILocation(line: 35, column: 3, scope: !22) // CHECK:STDOUT: !28 = !DILocation(line: 30, column: 1, scope: !22) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "CompareChar", linkageName: "_CCompareChar.Main", scope: null, file: !3, line: 38, type: !30, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !32) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "CompareChar", linkageName: "_CCompareChar.Main", scope: null, file: !1, line: 38, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !32) // CHECK:STDOUT: !30 = !DISubroutineType(types: !31) // CHECK:STDOUT: !31 = !{null, !7} // CHECK:STDOUT: !32 = !{!33} @@ -312,7 +312,7 @@ fn AddSubInt8() { // CHECK:STDOUT: !56 = !DILocation(line: 53, column: 11, scope: !29) // CHECK:STDOUT: !57 = !DILocation(line: 53, column: 3, scope: !29) // CHECK:STDOUT: !58 = !DILocation(line: 38, column: 1, scope: !29) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubCharChar", linkageName: "_CSubCharChar.Main", scope: null, file: !3, line: 56, type: !30, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubCharChar", linkageName: "_CSubCharChar.Main", scope: null, file: !1, line: 56, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !60) // CHECK:STDOUT: !60 = !{!61} // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !59, type: !7) // CHECK:STDOUT: !62 = !DILocation(line: 57, column: 3, scope: !59) @@ -321,45 +321,45 @@ fn AddSubInt8() { // CHECK:STDOUT: !65 = !DILocation(line: 59, column: 11, scope: !59) // CHECK:STDOUT: !66 = !DILocation(line: 59, column: 3, scope: !59) // CHECK:STDOUT: !67 = !DILocation(line: 56, column: 1, scope: !59) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "AddSubIntLiteral", linkageName: "_CAddSubIntLiteral.Main", scope: null, file: !3, line: 62, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "AddSubIntLiteral", linkageName: "_CAddSubIntLiteral.Main", scope: null, file: !1, line: 62, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !69 = !DILocation(line: 66, column: 3, scope: !68) // CHECK:STDOUT: !70 = !DILocation(line: 67, column: 3, scope: !68) // CHECK:STDOUT: !71 = !DILocation(line: 68, column: 3, scope: !68) // CHECK:STDOUT: !72 = !DILocation(line: 62, column: 1, scope: !68) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "AddSubInt8", linkageName: "_CAddSubInt8.Main", scope: null, file: !3, line: 71, type: !13, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "AddSubInt8", linkageName: "_CAddSubInt8.Main", scope: null, file: !1, line: 71, type: !13, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !74 = !DILocation(line: 75, column: 3, scope: !73) // CHECK:STDOUT: !75 = !DILocation(line: 76, column: 3, scope: !73) // CHECK:STDOUT: !76 = !DILocation(line: 77, column: 3, scope: !73) // CHECK:STDOUT: !77 = !DILocation(line: 71, column: 1, scope: !73) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.15688e19507865c6", scope: null, file: !3, line: 19, type: !30, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !79) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.15688e19507865c6", scope: null, file: !1, line: 19, type: !30, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !79) // CHECK:STDOUT: !79 = !{!80} // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !78, type: !7) // CHECK:STDOUT: !81 = !DILocation(line: 19, column: 1, scope: !78) -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.147e0bd019a31663", scope: null, file: !3, line: 19, type: !83, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.147e0bd019a31663", scope: null, file: !1, line: 19, type: !83, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !83 = !DISubroutineType(types: !84) // CHECK:STDOUT: !84 = !{null, !85} // CHECK:STDOUT: !85 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !86 = !{!87} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !82, type: !85) // CHECK:STDOUT: !88 = !DILocation(line: 19, column: 1, scope: !82) -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.eadca4a969cf6f21", scope: null, file: !3, line: 19, type: !90, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !93) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.eadca4a969cf6f21", scope: null, file: !1, line: 19, type: !90, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !93) // CHECK:STDOUT: !90 = !DISubroutineType(types: !91) // CHECK:STDOUT: !91 = !{null, !92} // CHECK:STDOUT: !92 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !93 = !{!94} // CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !89, type: !92) // CHECK:STDOUT: !95 = !DILocation(line: 19, column: 1, scope: !89) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.a4c7fafe8a72cac4", scope: null, file: !3, line: 19, type: !97, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !99) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.a4c7fafe8a72cac4", scope: null, file: !1, line: 19, type: !97, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !99) // CHECK:STDOUT: !97 = !DISubroutineType(types: !98) // CHECK:STDOUT: !98 = !{null, !8} // CHECK:STDOUT: !99 = !{!100} // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !96, type: !8) // CHECK:STDOUT: !101 = !DILocation(line: 19, column: 1, scope: !96) -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.084a2801e0f5d754", scope: null, file: !3, line: 19, type: !97, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !103) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Discard", linkageName: "_CDiscard.Main.084a2801e0f5d754", scope: null, file: !1, line: 19, type: !97, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !103) // CHECK:STDOUT: !103 = !{!104} // CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !102, type: !8) // CHECK:STDOUT: !105 = !DILocation(line: 19, column: 1, scope: !102) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.7c3e388e0087434a.Core.f0dfac78fde8177c", scope: null, file: !107, line: 129, type: !108, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !111) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Char.Core:SubWith.7c3e388e0087434a.Core.f0dfac78fde8177c", scope: null, file: !107, line: 129, type: !108, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !111) // CHECK:STDOUT: !107 = !DIFile(filename: "{{.*}}/prelude/types/char.carbon", directory: "") // CHECK:STDOUT: !108 = !DISubroutineType(types: !109) // CHECK:STDOUT: !109 = !{!110, !7, !7} @@ -371,7 +371,7 @@ fn AddSubInt8() { // CHECK:STDOUT: !115 = !DILocation(line: 130, column: 29, scope: !106) // CHECK:STDOUT: !116 = !DILocation(line: 130, column: 12, scope: !106) // CHECK:STDOUT: !117 = !DILocation(line: 130, column: 5, scope: !106) -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b27934686504f96c:SubWith.295cf9b677564c5c.Core.f0dfac78fde8177c", scope: null, file: !107, line: 123, type: !108, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !119) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b27934686504f96c:SubWith.295cf9b677564c5c.Core.f0dfac78fde8177c", scope: null, file: !107, line: 123, type: !108, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !119) // CHECK:STDOUT: !119 = !{!120, !121} // CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !118, type: !7) // CHECK:STDOUT: !121 = !DILocalVariable(arg: 2, scope: !118, type: !7) @@ -379,25 +379,25 @@ fn AddSubInt8() { // CHECK:STDOUT: !123 = !DILocation(line: 124, column: 29, scope: !118) // CHECK:STDOUT: !124 = !DILocation(line: 124, column: 12, scope: !118) // CHECK:STDOUT: !125 = !DILocation(line: 124, column: 5, scope: !118) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.db6d5218df1134ee", scope: null, file: !107, line: 42, type: !127, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !129) +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Char.Core:As.5d7343568c0b5715.Core.db6d5218df1134ee", scope: null, file: !107, line: 42, type: !127, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !129) // CHECK:STDOUT: !127 = !DISubroutineType(types: !128) // CHECK:STDOUT: !128 = !{!110, !7} // CHECK:STDOUT: !129 = !{!130} // CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !126, type: !7) // CHECK:STDOUT: !131 = !DILocation(line: 43, column: 5, scope: !126) -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !133, line: 88, type: !127, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !134) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !133, line: 88, type: !127, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !134) // CHECK:STDOUT: !133 = !DIFile(filename: "{{.*}}/prelude/types/uint.carbon", directory: "") // CHECK:STDOUT: !134 = !{!135} // CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !132, type: !7) // CHECK:STDOUT: !136 = !DILocation(line: 89, column: 12, scope: !132) // CHECK:STDOUT: !137 = !DILocation(line: 89, column: 5, scope: !132) -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !133, line: 80, type: !127, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !139) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !133, line: 80, type: !127, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !139) // CHECK:STDOUT: !139 = !{!140} // CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !138, type: !7) // CHECK:STDOUT: !141 = !DILocation(line: 82, column: 17, scope: !138) // CHECK:STDOUT: !142 = !DILocation(line: 82, column: 12, scope: !138) // CHECK:STDOUT: !143 = !DILocation(line: 82, column: 5, scope: !138) -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !133, line: 60, type: !145, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !147) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !133, line: 60, type: !145, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !147) // CHECK:STDOUT: !145 = !DISubroutineType(types: !146) // CHECK:STDOUT: !146 = !{!7, !7} // CHECK:STDOUT: !147 = !{!148} diff --git a/toolchain/lower/testdata/primitives/int_types.carbon b/toolchain/lower/testdata/primitives/int_types.carbon index fdaf902a4a9c..6e07b5b7cfcb 100644 --- a/toolchain/lower/testdata/primitives/int_types.carbon +++ b/toolchain/lower/testdata/primitives/int_types.carbon @@ -74,35 +74,35 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "pass_and_return.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F_i8", linkageName: "_CF_i8.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "pass_and_return.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F_i8", linkageName: "_CF_i8.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 4, column: 24, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F_u16", linkageName: "_CF_u16.Main", scope: null, file: !3, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F_u16", linkageName: "_CF_u16.Main", scope: null, file: !1, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 5, column: 27, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F_i64", linkageName: "_CF_i64.Main", scope: null, file: !3, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F_i64", linkageName: "_CF_i64.Main", scope: null, file: !1, line: 6, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{!21, !21} // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 6, column: 27, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F_u65536", linkageName: "_CF_u65536.Main", scope: null, file: !3, line: 7, type: !26, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F_u65536", linkageName: "_CF_u65536.Main", scope: null, file: !1, line: 7, type: !26, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !26 = !DISubroutineType(types: !27) // CHECK:STDOUT: !27 = !{!28, !28} // CHECK:STDOUT: !28 = !DIBasicType(name: "int", size: 65536, encoding: DW_ATE_unsigned) @@ -132,14 +132,14 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "load_and_store.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "LoadStore_Bytes", linkageName: "_CLoadStore_Bytes.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "load_and_store.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "LoadStore_Bytes", linkageName: "_CLoadStore_Bytes.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 24, encoding: DW_ATE_signed) @@ -150,7 +150,7 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 25, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 6, column: 3, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "LoadStore_NotBytes", linkageName: "_CLoadStore_NotBytes.Main", scope: null, file: !3, line: 10, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "LoadStore_NotBytes", linkageName: "_CLoadStore_NotBytes.Main", scope: null, file: !1, line: 10, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{!18, !8, !18} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 13, encoding: DW_ATE_signed) @@ -276,14 +276,14 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "ImplicitWidenSigned", linkageName: "_CImplicitWidenSigned.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "ImplicitWidenSigned", linkageName: "_CImplicitWidenSigned.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -291,7 +291,7 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: !9 = !{!10} // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !4, type: !8) // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 40, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "ImplicitWidenUnsigned", linkageName: "_CImplicitWidenUnsigned.Main", scope: null, file: !3, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "ImplicitWidenUnsigned", linkageName: "_CImplicitWidenUnsigned.Main", scope: null, file: !1, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{!15, !16} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) @@ -299,13 +299,13 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !12, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 5, column: 42, scope: !12) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "ImplicitWidenUnsignedToSigned", linkageName: "_CImplicitWidenUnsignedToSigned.Main", scope: null, file: !3, line: 6, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "ImplicitWidenUnsignedToSigned", linkageName: "_CImplicitWidenUnsignedToSigned.Main", scope: null, file: !1, line: 6, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{!7, !16} // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !20, type: !16) // CHECK:STDOUT: !25 = !DILocation(line: 6, column: 50, scope: !20) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "ImplicitWidenCustom", linkageName: "_CImplicitWidenCustom.Main", scope: null, file: !3, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "ImplicitWidenCustom", linkageName: "_CImplicitWidenCustom.Main", scope: null, file: !1, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !27 = !DISubroutineType(types: !28) // CHECK:STDOUT: !28 = !{!29, !30} // CHECK:STDOUT: !29 = !DIBasicType(name: "int", size: 5, encoding: DW_ATE_signed) @@ -313,7 +313,7 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !26, type: !30) // CHECK:STDOUT: !33 = !DILocation(line: 7, column: 57, scope: !26) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "ImplicitWidenUnsignedCustom", linkageName: "_CImplicitWidenUnsignedCustom.Main", scope: null, file: !3, line: 8, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !39) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "ImplicitWidenUnsignedCustom", linkageName: "_CImplicitWidenUnsignedCustom.Main", scope: null, file: !1, line: 8, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !39) // CHECK:STDOUT: !35 = !DISubroutineType(types: !36) // CHECK:STDOUT: !36 = !{!37, !38} // CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 5, encoding: DW_ATE_unsigned) @@ -321,72 +321,72 @@ fn ImplicitWidenUnsignedCustom(a: Core.UInt(4)) -> Core.UInt(5) { return a; } // CHECK:STDOUT: !39 = !{!40} // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !34, type: !38) // CHECK:STDOUT: !41 = !DILocation(line: 8, column: 67, scope: !34) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.211c7f442b391488", scope: null, file: !43, line: 64, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.211c7f442b391488", scope: null, file: !43, line: 64, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !44) // CHECK:STDOUT: !43 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !44 = !{!45} // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !42, type: !8) // CHECK:STDOUT: !46 = !DILocation(line: 66, column: 17, scope: !42) // CHECK:STDOUT: !47 = !DILocation(line: 66, column: 12, scope: !42) // CHECK:STDOUT: !48 = !DILocation(line: 66, column: 5, scope: !42) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dbd6eca082a732b7", scope: null, file: !50, line: 88, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !51) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.dbd6eca082a732b7", scope: null, file: !50, line: 88, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !51) // CHECK:STDOUT: !50 = !DIFile(filename: "{{.*}}/prelude/types/uint.carbon", directory: "") // CHECK:STDOUT: !51 = !{!52} // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !49, type: !16) // CHECK:STDOUT: !53 = !DILocation(line: 89, column: 12, scope: !49) // CHECK:STDOUT: !54 = !DILocation(line: 89, column: 5, scope: !49) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !50, line: 88, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !56) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.b26071071fee62b9", scope: null, file: !50, line: 88, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56) // CHECK:STDOUT: !56 = !{!57} // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !16) // CHECK:STDOUT: !58 = !DILocation(line: 89, column: 12, scope: !55) // CHECK:STDOUT: !59 = !DILocation(line: 89, column: 5, scope: !55) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.913488c3cb524db0", scope: null, file: !43, line: 64, type: !27, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !61) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.913488c3cb524db0", scope: null, file: !43, line: 64, type: !27, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !61) // CHECK:STDOUT: !61 = !{!62} // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !60, type: !30) // CHECK:STDOUT: !63 = !DILocation(line: 66, column: 17, scope: !60) // CHECK:STDOUT: !64 = !DILocation(line: 66, column: 12, scope: !60) // CHECK:STDOUT: !65 = !DILocation(line: 66, column: 5, scope: !60) -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.4c1b8e556dc24c05", scope: null, file: !50, line: 88, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !67) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:ImplicitAs.f48df0d8add56b17.Core.4c1b8e556dc24c05", scope: null, file: !50, line: 88, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !67) // CHECK:STDOUT: !67 = !{!68} // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !66, type: !38) // CHECK:STDOUT: !69 = !DILocation(line: 89, column: 12, scope: !66) // CHECK:STDOUT: !70 = !DILocation(line: 89, column: 5, scope: !66) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !43, line: 59, type: !72, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !43, line: 59, type: !72, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !72 = !DISubroutineType(types: !73) // CHECK:STDOUT: !73 = !{!8, !8} // CHECK:STDOUT: !74 = !{!75} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !71, type: !8) // CHECK:STDOUT: !76 = !DILocation(line: 59, column: 28, scope: !71) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.d93106ca8c7912cd", scope: null, file: !50, line: 72, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !78) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.d93106ca8c7912cd", scope: null, file: !50, line: 72, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !78) // CHECK:STDOUT: !78 = !{!79} // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !77, type: !16) // CHECK:STDOUT: !80 = !DILocation(line: 74, column: 17, scope: !77) // CHECK:STDOUT: !81 = !DILocation(line: 74, column: 12, scope: !77) // CHECK:STDOUT: !82 = !DILocation(line: 74, column: 5, scope: !77) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !50, line: 80, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !84) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Int.9452f4c51951679b.Core:FromUInt.94db85caea4a44af.Core.1d53f86bcab954ee", scope: null, file: !50, line: 80, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !84) // CHECK:STDOUT: !84 = !{!85} // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !83, type: !16) // CHECK:STDOUT: !86 = !DILocation(line: 82, column: 17, scope: !83) // CHECK:STDOUT: !87 = !DILocation(line: 82, column: 12, scope: !83) // CHECK:STDOUT: !88 = !DILocation(line: 82, column: 5, scope: !83) -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.044c7d430ddd4fd6", scope: null, file: !43, line: 59, type: !90, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !92) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.044c7d430ddd4fd6", scope: null, file: !43, line: 59, type: !90, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !92) // CHECK:STDOUT: !90 = !DISubroutineType(types: !91) // CHECK:STDOUT: !91 = !{!30, !30} // CHECK:STDOUT: !92 = !{!93} // CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !89, type: !30) // CHECK:STDOUT: !94 = !DILocation(line: 59, column: 28, scope: !89) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.cc82cccb0d5a8ccf", scope: null, file: !50, line: 72, type: !35, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !96) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.UInt.9452f4c51951679b.Core:FromUInt.a1a82301830d1e08.Core.cc82cccb0d5a8ccf", scope: null, file: !50, line: 72, type: !35, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !96) // CHECK:STDOUT: !96 = !{!97} // CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !95, type: !38) // CHECK:STDOUT: !98 = !DILocation(line: 74, column: 17, scope: !95) // CHECK:STDOUT: !99 = !DILocation(line: 74, column: 12, scope: !95) // CHECK:STDOUT: !100 = !DILocation(line: 74, column: 5, scope: !95) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !50, line: 60, type: !102, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !104) +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.ca1ac10d3fc7c1a8", scope: null, file: !50, line: 60, type: !102, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !104) // CHECK:STDOUT: !102 = !DISubroutineType(types: !103) // CHECK:STDOUT: !103 = !{!16, !16} // CHECK:STDOUT: !104 = !{!105} // CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !101, type: !16) // CHECK:STDOUT: !106 = !DILocation(line: 60, column: 29, scope: !101) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.044c7d430ddd4fd6", scope: null, file: !50, line: 60, type: !108, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "AsUInt", linkageName: "_CAsUInt.UInt.9452f4c51951679b.Core:AnyUInt.Core.044c7d430ddd4fd6", scope: null, file: !50, line: 60, type: !108, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !110) // CHECK:STDOUT: !108 = !DISubroutineType(types: !109) // CHECK:STDOUT: !109 = !{!38, !38} // CHECK:STDOUT: !110 = !{!111} diff --git a/toolchain/lower/testdata/primitives/numeric_literals.carbon b/toolchain/lower/testdata/primitives/numeric_literals.carbon index e44fc9fe8090..e9779923c8c2 100644 --- a/toolchain/lower/testdata/primitives/numeric_literals.carbon +++ b/toolchain/lower/testdata/primitives/numeric_literals.carbon @@ -96,14 +96,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "numeric_literals.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "numeric_literals.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -111,25 +111,25 @@ fn F() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 26, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 22, column: 26, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 22, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e3fd6065b3f4357c:core.Destroy.Core", scope: null, file: !3, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e3fd6065b3f4357c:core.Destroy.Core", scope: null, file: !1, line: 22, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !19, type: !15) // CHECK:STDOUT: !22 = !DILocation(line: 22, column: 3, scope: !19) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !26} // CHECK:STDOUT: !26 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !23, type: !26) // CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !23) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8ab5ebc4f407c395:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !31) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8ab5ebc4f407c395:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !31) // CHECK:STDOUT: !31 = !{!32} // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !30, type: !15) // CHECK:STDOUT: !33 = !DILocation(line: 16, column: 3, scope: !30) diff --git a/toolchain/lower/testdata/primitives/optional.carbon b/toolchain/lower/testdata/primitives/optional.carbon index 921219cc8230..6a8549cc32cc 100644 --- a/toolchain/lower/testdata/primitives/optional.carbon +++ b/toolchain/lower/testdata/primitives/optional.carbon @@ -369,21 +369,21 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !{!9} // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 3, column: 39, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !3, line: 3, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !1, line: 3, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -396,7 +396,7 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !21 = !DILocation(line: 5, column: 5, scope: !11) // CHECK:STDOUT: !22 = !DILocation(line: 7, column: 10, scope: !11) // CHECK:STDOUT: !23 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !3, line: 10, type: !25, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !1, line: 10, type: !25, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !25 = !DISubroutineType(types: !26) // CHECK:STDOUT: !26 = !{null, !7, !7} // CHECK:STDOUT: !27 = !{!28, !29} @@ -411,165 +411,165 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !36 = !DILocation(line: 17, column: 3, scope: !24) // CHECK:STDOUT: !37 = !DILocation(line: 18, column: 3, scope: !24) // CHECK:STDOUT: !38 = !DILocation(line: 10, column: 1, scope: !24) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.05c48b3d4126597e:core.Destroy.Core", scope: null, file: !3, line: 13, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.05c48b3d4126597e:core.Destroy.Core", scope: null, file: !1, line: 13, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !42) // CHECK:STDOUT: !40 = !DISubroutineType(types: !41) // CHECK:STDOUT: !41 = !{null, !14} // CHECK:STDOUT: !42 = !{!43} // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !39, type: !14) // CHECK:STDOUT: !44 = !DILocation(line: 13, column: 10, scope: !39) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d4fdfc2912de527a:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !46) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d4fdfc2912de527a:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !46) // CHECK:STDOUT: !46 = !{!47} // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !45, type: !14) // CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !45) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb54d7735089d035:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eb54d7735089d035:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !14) // CHECK:STDOUT: !52 = !DILocation(line: 18, column: 3, scope: !49) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.33aade76ef369ae0:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.33aade76ef369ae0:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !14) // CHECK:STDOUT: !56 = !DILocation(line: 18, column: 3, scope: !53) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4352d4717a4da3c5:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !58) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4352d4717a4da3c5:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !58) // CHECK:STDOUT: !58 = !{!59} // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !57, type: !14) // CHECK:STDOUT: !60 = !DILocation(line: 18, column: 3, scope: !57) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bc7b205814bb8542:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !62) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bc7b205814bb8542:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !62) // CHECK:STDOUT: !62 = !{!63} // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !61, type: !14) // CHECK:STDOUT: !64 = !DILocation(line: 18, column: 3, scope: !61) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.56bc00fa6756ea9e:core.Destroy.Core", scope: null, file: !3, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.56bc00fa6756ea9e:core.Destroy.Core", scope: null, file: !1, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !66) // CHECK:STDOUT: !66 = !{!67} // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !65, type: !14) // CHECK:STDOUT: !68 = !DILocation(line: 18, column: 3, scope: !65) -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !3, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !70) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Op", linkageName: "_COp.94ba1c30d421702e:core.Destroy.Core", scope: null, file: !1, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !70) // CHECK:STDOUT: !70 = !{!71} // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !69, type: !14) // CHECK:STDOUT: !72 = !DILocation(line: 16, column: 3, scope: !69) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0fc9634857315db2:core.Destroy.Core", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !74) // CHECK:STDOUT: !74 = !{!75} // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !76 = !DILocation(line: 16, column: 3, scope: !73) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !3, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !78) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Op", linkageName: "_COp.69700c1fc1b2744c:core.Destroy.Core", scope: null, file: !1, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !78) // CHECK:STDOUT: !78 = !{!79} // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !77, type: !14) // CHECK:STDOUT: !80 = !DILocation(line: 16, column: 3, scope: !77) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Op", linkageName: "_COp.36bd54c278c044c5:core.Destroy.Core", scope: null, file: !3, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Op", linkageName: "_COp.36bd54c278c044c5:core.Destroy.Core", scope: null, file: !1, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !82) // CHECK:STDOUT: !82 = !{!83} // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !81, type: !14) // CHECK:STDOUT: !84 = !DILocation(line: 16, column: 3, scope: !81) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30688d383ae72bab:core.Destroy.Core", scope: null, file: !3, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !86) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30688d383ae72bab:core.Destroy.Core", scope: null, file: !1, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !86) // CHECK:STDOUT: !86 = !{!87} // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !85, type: !14) // CHECK:STDOUT: !88 = !DILocation(line: 16, column: 3, scope: !85) -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp.49575b3ccc332429:core.Destroy.Core", scope: null, file: !3, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !90) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp.49575b3ccc332429:core.Destroy.Core", scope: null, file: !1, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !90) // CHECK:STDOUT: !90 = !{!91} // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !89, type: !14) // CHECK:STDOUT: !92 = !DILocation(line: 16, column: 3, scope: !89) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b79ac2ab1b7701d6", scope: null, file: !94, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !95) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b79ac2ab1b7701d6", scope: null, file: !94, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !95) // CHECK:STDOUT: !94 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !95 = !{!96} // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !93, type: !14) // CHECK:STDOUT: !97 = !DILocation(line: 37, column: 12, scope: !93) // CHECK:STDOUT: !98 = !DILocation(line: 37, column: 5, scope: !93) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b79ac2ab1b7701d6", scope: null, file: !94, line: 39, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !100) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b79ac2ab1b7701d6", scope: null, file: !94, line: 39, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !100) // CHECK:STDOUT: !100 = !{!101} // CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !99, type: !14) // CHECK:STDOUT: !102 = !DILocation(line: 40, column: 12, scope: !99) // CHECK:STDOUT: !103 = !DILocation(line: 40, column: 5, scope: !99) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.a77ff6e8edaf9e8d", scope: null, file: !94, line: 105, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !107) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.a77ff6e8edaf9e8d", scope: null, file: !94, line: 105, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !107) // CHECK:STDOUT: !105 = !DISubroutineType(types: !106) // CHECK:STDOUT: !106 = !{!14, !7} // CHECK:STDOUT: !107 = !{!108} // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !104, type: !7) // CHECK:STDOUT: !109 = !DILocation(line: 106, column: 12, scope: !104) // CHECK:STDOUT: !110 = !DILocation(line: 106, column: 5, scope: !104) -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.70a0b54a75854b7a", scope: null, file: !94, line: 30, type: !112, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.70a0b54a75854b7a", scope: null, file: !94, line: 30, type: !112, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !112 = !DISubroutineType(types: !113) // CHECK:STDOUT: !113 = !{!14} // CHECK:STDOUT: !114 = !DILocation(line: 31, column: 12, scope: !111) // CHECK:STDOUT: !115 = !DILocation(line: 31, column: 5, scope: !111) -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.36d191ed69f42abb", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !118) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.36d191ed69f42abb", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !118) // CHECK:STDOUT: !117 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "") // CHECK:STDOUT: !118 = !{!119} // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !116, type: !7) // CHECK:STDOUT: !120 = !DILocation(line: 43, column: 40, scope: !116) // CHECK:STDOUT: !121 = !DILocation(line: 43, column: 33, scope: !116) -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6f97602f44c068f9", scope: null, file: !94, line: 105, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !123) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6f97602f44c068f9", scope: null, file: !94, line: 105, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !123) // CHECK:STDOUT: !123 = !{!124} // CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !122, type: !7) // CHECK:STDOUT: !125 = !DILocation(line: 106, column: 12, scope: !122) // CHECK:STDOUT: !126 = !DILocation(line: 106, column: 5, scope: !122) -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.7e715d26c6bb9daa", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !128) +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.7e715d26c6bb9daa", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !128) // CHECK:STDOUT: !128 = !{!129} // CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !127, type: !7) // CHECK:STDOUT: !130 = !DILocation(line: 43, column: 40, scope: !127) // CHECK:STDOUT: !131 = !DILocation(line: 43, column: 33, scope: !127) -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.36d191ed69f42abb", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !133) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.36d191ed69f42abb", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !133) // CHECK:STDOUT: !133 = !{!134} // CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !132, type: !7) // CHECK:STDOUT: !135 = !DILocation(line: 47, column: 34, scope: !132) // CHECK:STDOUT: !136 = !DILocation(line: 47, column: 27, scope: !132) -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bd2b2818aef220bf", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !138) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bd2b2818aef220bf", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !138) // CHECK:STDOUT: !138 = !{!139} // CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !137, type: !7) // CHECK:STDOUT: !140 = !DILocation(line: 47, column: 34, scope: !137) // CHECK:STDOUT: !141 = !DILocation(line: 47, column: 27, scope: !137) -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.7e715d26c6bb9daa", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !143) +// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.7e715d26c6bb9daa", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !143) // CHECK:STDOUT: !143 = !{!144} // CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !142, type: !7) // CHECK:STDOUT: !145 = !DILocation(line: 47, column: 34, scope: !142) // CHECK:STDOUT: !146 = !DILocation(line: 47, column: 27, scope: !142) -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.7f331ac9d2b85055", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !148) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.7f331ac9d2b85055", scope: null, file: !117, line: 47, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !148) // CHECK:STDOUT: !148 = !{!149} // CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !147, type: !7) // CHECK:STDOUT: !150 = !DILocation(line: 47, column: 34, scope: !147) // CHECK:STDOUT: !151 = !DILocation(line: 47, column: 27, scope: !147) -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !94, line: 172, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !153) +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !94, line: 172, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !153) // CHECK:STDOUT: !153 = !{!154} // CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !152, type: !14) // CHECK:STDOUT: !155 = !DILocation(line: 173, column: 16, scope: !152) // CHECK:STDOUT: !156 = !DILocation(line: 173, column: 12, scope: !152) // CHECK:STDOUT: !157 = !DILocation(line: 173, column: 5, scope: !152) -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !94, line: 175, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !159) +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !94, line: 175, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !159) // CHECK:STDOUT: !159 = !{!160} // CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !158, type: !14) // CHECK:STDOUT: !161 = !DILocation(line: 176, column: 5, scope: !158) -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.70a0b54a75854b7a", scope: null, file: !94, line: 80, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !163) +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.70a0b54a75854b7a", scope: null, file: !94, line: 80, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !163) // CHECK:STDOUT: !163 = !{!164} // CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !162, type: !7) // CHECK:STDOUT: !165 = !DILocation(line: 81, column: 12, scope: !162) // CHECK:STDOUT: !166 = !DILocation(line: 81, column: 5, scope: !162) -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "None", linkageName: "_CNone.74becf39533834ee:OptionalStorage.Core.b99f4a084b13a83f", scope: null, file: !94, line: 125, type: !112, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "None", linkageName: "_CNone.74becf39533834ee:OptionalStorage.Core.b99f4a084b13a83f", scope: null, file: !94, line: 125, type: !112, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !168 = !DILocation(line: 128, column: 5, scope: !167) // CHECK:STDOUT: !169 = !DILocation(line: 129, column: 5, scope: !167) -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.04776faa19f4241b", scope: null, file: !94, line: 87, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !171) +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.04776faa19f4241b", scope: null, file: !94, line: 87, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !171) // CHECK:STDOUT: !171 = !{!172} // CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !170, type: !7) // CHECK:STDOUT: !173 = !DILocation(line: 88, column: 29, scope: !170) // CHECK:STDOUT: !174 = !DILocation(line: 88, column: 12, scope: !170) // CHECK:STDOUT: !175 = !DILocation(line: 88, column: 5, scope: !170) -// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.70a0b54a75854b7a", scope: null, file: !94, line: 33, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !177) +// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.70a0b54a75854b7a", scope: null, file: !94, line: 33, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !177) // CHECK:STDOUT: !177 = !{!178} // CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !176, type: !7) // CHECK:STDOUT: !179 = !DILocation(line: 34, column: 12, scope: !176) // CHECK:STDOUT: !180 = !DILocation(line: 34, column: 5, scope: !176) -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.a1e92423fb5cda0f", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !182) +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.a1e92423fb5cda0f", scope: null, file: !117, line: 43, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !182) // CHECK:STDOUT: !182 = !{!183} // CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !181, type: !7) // CHECK:STDOUT: !184 = !DILocation(line: 43, column: 40, scope: !181) // CHECK:STDOUT: !185 = !DILocation(line: 43, column: 33, scope: !181) -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.442ff502447e2586", scope: null, file: !94, line: 33, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !187) +// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.442ff502447e2586", scope: null, file: !94, line: 33, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !187) // CHECK:STDOUT: !187 = !{!188} // CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !186, type: !7) // CHECK:STDOUT: !189 = !DILocation(line: 34, column: 12, scope: !186) // CHECK:STDOUT: !190 = !DILocation(line: 34, column: 5, scope: !186) -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.b99f4a084b13a83f", scope: null, file: !94, line: 131, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !192) +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.b99f4a084b13a83f", scope: null, file: !94, line: 131, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !192) // CHECK:STDOUT: !192 = !{!193} // CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !191, type: !7) // CHECK:STDOUT: !194 = !DILocation(line: 137, column: 5, scope: !191) // CHECK:STDOUT: !195 = !DILocation(line: 138, column: 5, scope: !191) // CHECK:STDOUT: !196 = !DILocation(line: 139, column: 5, scope: !191) -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !198, line: 64, type: !199, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !201) +// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.40372ba0ea03ef47", scope: null, file: !198, line: 64, type: !199, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !201) // CHECK:STDOUT: !198 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") // CHECK:STDOUT: !199 = !DISubroutineType(types: !200) // CHECK:STDOUT: !200 = !{!7, !7} @@ -577,18 +577,18 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !197, type: !7) // CHECK:STDOUT: !203 = !DILocation(line: 66, column: 17, scope: !197) // CHECK:STDOUT: !204 = !DILocation(line: 66, column: 5, scope: !197) -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.9e376a14fbf8fb3d", scope: null, file: !94, line: 131, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !206) +// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.9e376a14fbf8fb3d", scope: null, file: !94, line: 131, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !206) // CHECK:STDOUT: !206 = !{!207} // CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !205, type: !7) // CHECK:STDOUT: !208 = !DILocation(line: 137, column: 5, scope: !205) // CHECK:STDOUT: !209 = !DILocation(line: 137, column: 28, scope: !205) // CHECK:STDOUT: !210 = !DILocation(line: 138, column: 5, scope: !205) // CHECK:STDOUT: !211 = !DILocation(line: 139, column: 5, scope: !205) -// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !198, line: 59, type: !199, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !213) +// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !198, line: 59, type: !199, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !213) // CHECK:STDOUT: !213 = !{!214} // CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !212, type: !7) // CHECK:STDOUT: !215 = !DILocation(line: 59, column: 28, scope: !212) -// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.5bd8d5767580997a", scope: null, file: !217, line: 23, type: !105, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !218) +// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.5bd8d5767580997a", scope: null, file: !217, line: 23, type: !105, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !218) // CHECK:STDOUT: !217 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") // CHECK:STDOUT: !218 = !{!219} // CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !216, type: !7) @@ -658,34 +658,34 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "copy.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e8cfefb1bcff6750:core.Destroy.Core", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "copy.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e8cfefb1bcff6750:core.Destroy.Core", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7} // 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: 9, column: 9, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!7, !7} // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !11, type: !7) // CHECK:STDOUT: !16 = !DILocation(line: 11, column: 10, scope: !11) // CHECK:STDOUT: !17 = !DILocation(line: 11, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.da424a1efa3a0e0f", scope: null, file: !19, line: 50, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.da424a1efa3a0e0f", scope: null, file: !19, line: 50, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !19 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !18, type: !7) // CHECK:STDOUT: !22 = !DILocation(line: 51, column: 12, scope: !18) // CHECK:STDOUT: !23 = !DILocation(line: 51, column: 5, scope: !18) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 147, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 147, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !24, type: !7) // CHECK:STDOUT: !27 = !DILocation(line: 148, column: 9, scope: !24) @@ -695,19 +695,19 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !31 = !DILocation(line: 149, column: 7, scope: !24) // CHECK:STDOUT: !32 = !DILocation(line: 151, column: 14, scope: !24) // CHECK:STDOUT: !33 = !DILocation(line: 151, column: 7, scope: !24) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 141, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !35) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 141, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !35) // CHECK:STDOUT: !35 = !{!36} // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !37 = !DILocation(line: 142, column: 12, scope: !34) // CHECK:STDOUT: !38 = !DILocation(line: 142, column: 5, scope: !34) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 131, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !40) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 131, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !40) // CHECK:STDOUT: !40 = !{!41} // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !39, type: !7) // CHECK:STDOUT: !42 = !DILocation(line: 137, column: 5, scope: !39) // CHECK:STDOUT: !43 = !DILocation(line: 137, column: 28, scope: !39) // CHECK:STDOUT: !44 = !DILocation(line: 138, column: 5, scope: !39) // CHECK:STDOUT: !45 = !DILocation(line: 139, column: 5, scope: !39) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 125, type: !47, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.49fa0e4cc21a3ef6", scope: null, file: !19, line: 125, type: !47, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!7} // CHECK:STDOUT: !49 = !DILocation(line: 128, column: 5, scope: !46) @@ -729,14 +729,14 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "copy_pointer.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "copy_pointer.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0, 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: 64) @@ -744,7 +744,7 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !4, type: !7) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 10, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 6, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.4791ff83c858ed65", scope: null, file: !13, line: 50, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.4791ff83c858ed65", scope: null, file: !13, line: 50, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !13 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !14 = !{!15} // CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !12, type: !7) diff --git a/toolchain/lower/testdata/primitives/string.carbon b/toolchain/lower/testdata/primitives/string.carbon index 402149222ba8..3c3e86e2d3eb 100644 --- a/toolchain/lower/testdata/primitives/string.carbon +++ b/toolchain/lower/testdata/primitives/string.carbon @@ -77,25 +77,25 @@ fn Copy(s: str) -> str { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "string.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "string.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 19, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 18, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !1, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 25, column: 3, scope: !9) // CHECK:STDOUT: !11 = !DILocation(line: 22, column: 1, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !3, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !1, line: 28, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !13 = !DILocation(line: 31, column: 3, scope: !12) // CHECK:STDOUT: !14 = !DILocation(line: 28, column: 1, scope: !12) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !3, line: 34, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !1, line: 34, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{!18, !18} // CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/primitives/type_values.carbon b/toolchain/lower/testdata/primitives/type_values.carbon index 4521e64e5637..d689845dbda0 100644 --- a/toolchain/lower/testdata/primitives/type_values.carbon +++ b/toolchain/lower/testdata/primitives/type_values.carbon @@ -50,19 +50,19 @@ fn F64() -> type { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "type_values.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "I32", linkageName: "_CI32.Main", scope: null, file: !3, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "type_values.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "I32", linkageName: "_CI32.Main", scope: null, file: !1, line: 16, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "I48", linkageName: "_CI48.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "I48", linkageName: "_CI48.Main", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 21, column: 3, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F64", linkageName: "_CF64.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F64", linkageName: "_CF64.Main", scope: null, file: !1, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DILocation(line: 25, column: 3, scope: !11) diff --git a/toolchain/lower/testdata/primitives/zero.carbon b/toolchain/lower/testdata/primitives/zero.carbon index 7fde040ed600..e8ce5183b98e 100644 --- a/toolchain/lower/testdata/primitives/zero.carbon +++ b/toolchain/lower/testdata/primitives/zero.carbon @@ -25,14 +25,14 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "zero.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "zero.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/return/code_after_return.carbon b/toolchain/lower/testdata/return/code_after_return.carbon index 7773d4580163..65e76e520bf0 100644 --- a/toolchain/lower/testdata/return/code_after_return.carbon +++ b/toolchain/lower/testdata/return/code_after_return.carbon @@ -34,16 +34,16 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "code_after_return.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "code_after_return.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 3, scope: !8) diff --git a/toolchain/lower/testdata/return/function_ids_in_different_files.carbon b/toolchain/lower/testdata/return/function_ids_in_different_files.carbon index a80effb9b526..9c1e7ec2b3dd 100644 --- a/toolchain/lower/testdata/return/function_ids_in_different_files.carbon +++ b/toolchain/lower/testdata/return/function_ids_in_different_files.carbon @@ -28,13 +28,13 @@ fn G() { // CHECK:STDOUT: ; ModuleID = 'a.carbon' // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "a.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: @@ -52,18 +52,18 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 3, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 3, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6944efcfbb6a8360", scope: null, file: !10, line: 2, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6944efcfbb6a8360", scope: null, file: !10, line: 2, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !11 = !DILocation(line: 4, column: 3, scope: !9) diff --git a/toolchain/lower/testdata/return/no_return_from_run.carbon b/toolchain/lower/testdata/return/no_return_from_run.carbon index 8cd4f68b5377..37a065b3619c 100644 --- a/toolchain/lower/testdata/return/no_return_from_run.carbon +++ b/toolchain/lower/testdata/return/no_return_from_run.carbon @@ -36,19 +36,19 @@ fn Foo() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_return_from_run.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_return_from_run.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 1, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !3, line: 17, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !1, line: 17, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 3, scope: !9) diff --git a/toolchain/lower/testdata/return/no_value.carbon b/toolchain/lower/testdata/return/no_value.carbon index 31dcce5074c8..68b960fd5bea 100644 --- a/toolchain/lower/testdata/return/no_value.carbon +++ b/toolchain/lower/testdata/return/no_value.carbon @@ -25,14 +25,14 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_value.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_value.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 14, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/return/return_var.carbon b/toolchain/lower/testdata/return/return_var.carbon index 7f1675e76133..4c60b80a1b25 100644 --- a/toolchain/lower/testdata/return/return_var.carbon +++ b/toolchain/lower/testdata/return/return_var.carbon @@ -36,14 +36,14 @@ fn Make() -> C { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "return_var.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_var.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !1, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/return/return_var_byval.carbon b/toolchain/lower/testdata/return/return_var_byval.carbon index c40c6d38bb21..dc105159d988 100644 --- a/toolchain/lower/testdata/return/return_var_byval.carbon +++ b/toolchain/lower/testdata/return/return_var_byval.carbon @@ -41,21 +41,21 @@ fn Main() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "return_var_byval.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_var_byval.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 12, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 14, column: 16, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} diff --git a/toolchain/lower/testdata/return/value.carbon b/toolchain/lower/testdata/return/value.carbon index 846d70330066..5068840ffdff 100644 --- a/toolchain/lower/testdata/return/value.carbon +++ b/toolchain/lower/testdata/return/value.carbon @@ -25,14 +25,14 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "value.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "value.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/return/var.carbon b/toolchain/lower/testdata/return/var.carbon index b348330ccede..eb27890fd432 100644 --- a/toolchain/lower/testdata/return/var.carbon +++ b/toolchain/lower/testdata/return/var.carbon @@ -41,21 +41,21 @@ fn Main() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 15, column: 10, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} diff --git a/toolchain/lower/testdata/struct/empty.carbon b/toolchain/lower/testdata/struct/empty.carbon index 9b0e85cc47c8..34ec5b22d957 100644 --- a/toolchain/lower/testdata/struct/empty.carbon +++ b/toolchain/lower/testdata/struct/empty.carbon @@ -38,14 +38,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/struct/layout.carbon b/toolchain/lower/testdata/struct/layout.carbon index f3ea68d719b7..a574c603ec60 100644 --- a/toolchain/lower/testdata/struct/layout.carbon +++ b/toolchain/lower/testdata/struct/layout.carbon @@ -111,14 +111,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "no_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "no_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) @@ -129,14 +129,14 @@ fn F() { // CHECK:STDOUT: !12 = !DILocation(line: 10, column: 6, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 7, column: 3, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95808ad559cb17b5:core.Destroy.Core", scope: null, file: !3, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95808ad559cb17b5:core.Destroy.Core", scope: null, file: !1, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !25} // CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -177,28 +177,28 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "avoid_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "avoid_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 7, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 8, column: 6, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 8, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !3, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !1, line: 7, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -248,14 +248,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "use_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "use_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 8, column: 3, scope: !4) @@ -264,21 +264,21 @@ fn F() { // CHECK:STDOUT: !10 = !DILocation(line: 10, column: 6, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 3, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 8, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a68f8a656015afed:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a68f8a656015afed:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !23) // CHECK:STDOUT: !30 = !DILocation(line: 8, column: 3, scope: !27) @@ -325,14 +325,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "implicit_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "implicit_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 8, column: 3, scope: !4) @@ -341,21 +341,21 @@ fn F() { // CHECK:STDOUT: !10 = !DILocation(line: 10, column: 6, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !17) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 8, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !17) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !16} // CHECK:STDOUT: !16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !17 = !{!18} // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !13, type: !16) // CHECK:STDOUT: !19 = !DILocation(line: 8, column: 3, scope: !13) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6e3a24383a9179dd:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !21 = !DISubroutineType(types: !22) // CHECK:STDOUT: !22 = !{null, !23} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!25} // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !20, type: !23) // CHECK:STDOUT: !26 = !DILocation(line: 8, column: 3, scope: !20) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c54455699b83e3bd:core.Destroy.Core", scope: null, file: !3, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !28) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c54455699b83e3bd:core.Destroy.Core", scope: null, file: !1, line: 8, type: !21, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !28) // CHECK:STDOUT: !28 = !{!29} // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !27, type: !23) // CHECK:STDOUT: !30 = !DILocation(line: 8, column: 3, scope: !27) @@ -399,35 +399,35 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "insert_padding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "insert_padding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 9, column: 3, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 10, column: 6, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 10, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 5, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 9, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !11, type: !14) // CHECK:STDOUT: !17 = !DILocation(line: 9, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95808ad559cb17b5:core.Destroy.Core", scope: null, file: !3, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95808ad559cb17b5:core.Destroy.Core", scope: null, file: !1, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!23} // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !18, type: !21) // CHECK:STDOUT: !24 = !DILocation(line: 9, column: 3, scope: !18) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.383dc994920f31dc:core.Destroy.Core", scope: null, file: !3, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.383dc994920f31dc:core.Destroy.Core", scope: null, file: !1, line: 9, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !26 = !{!27} // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !25, type: !21) // CHECK:STDOUT: !28 = !DILocation(line: 9, column: 3, scope: !25) diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index 809c2a232cda..a040cecd0271 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -76,14 +76,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "member_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "member_access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -94,20 +94,20 @@ fn Run() -> i32 { // CHECK:STDOUT: !12 = !DILocation(line: 15, column: 16, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 16, column: 16, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !7} // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !15, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 16, column: 3, scope: !15) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !25 = !{!26} // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !21, type: !24) // CHECK:STDOUT: !27 = !DILocation(line: 14, column: 3, scope: !21) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.50b1ebab712608de:core.Destroy.Core", scope: null, file: !3, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !29) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Op", linkageName: "_COp.50b1ebab712608de:core.Destroy.Core", scope: null, file: !1, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !29) // CHECK:STDOUT: !29 = !{!30} // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !28, type: !24) // CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) diff --git a/toolchain/lower/testdata/struct/nested_struct.carbon b/toolchain/lower/testdata/struct/nested_struct.carbon index 4c6084719016..000c699ce15f 100644 --- a/toolchain/lower/testdata/struct/nested_struct.carbon +++ b/toolchain/lower/testdata/struct/nested_struct.carbon @@ -26,14 +26,14 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested_struct.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested_struct.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon index 27c56dc9fbc9..c4dc0e23a8fa 100644 --- a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon @@ -58,14 +58,14 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested_struct_in_place.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested_struct_in_place.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -73,21 +73,21 @@ fn G() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 61, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 16, column: 71, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 16, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.330320b9ccdd4880:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.330320b9ccdd4880:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !22) // CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !26) diff --git a/toolchain/lower/testdata/struct/one_entry.carbon b/toolchain/lower/testdata/struct/one_entry.carbon index dcfb1a20872d..9cc3d6c74cd0 100644 --- a/toolchain/lower/testdata/struct/one_entry.carbon +++ b/toolchain/lower/testdata/struct/one_entry.carbon @@ -58,14 +58,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "one_entry.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "one_entry.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -73,13 +73,13 @@ fn Run() -> i32 { // CHECK:STDOUT: !9 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 22, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 3, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9ba7bda1866a9bea:core.Destroy.Core", scope: null, file: !3, line: 15, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9ba7bda1866a9bea:core.Destroy.Core", scope: null, file: !1, line: 15, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/struct/partially_const.carbon b/toolchain/lower/testdata/struct/partially_const.carbon index 711a6b222974..ca5bbf10ce66 100644 --- a/toolchain/lower/testdata/struct/partially_const.carbon +++ b/toolchain/lower/testdata/struct/partially_const.carbon @@ -31,14 +31,14 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "partially_const.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !9) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "partially_const.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7, !8} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 30c45c530e41..9de09a31ab71 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -69,14 +69,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "two_entries.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "two_entries.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -85,13 +85,13 @@ fn Run() -> i32 { // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 31, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 31, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 15, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !3, line: 15, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f30036b66b652106:core.Destroy.Core", scope: null, file: !1, line: 15, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index b6f99f6f18e2..78c1a5059dcd 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -72,14 +72,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "element_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "element_access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -90,13 +90,13 @@ fn Run() -> i32 { // CHECK:STDOUT: !12 = !DILocation(line: 15, column: 16, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 16, column: 16, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 17, column: 3, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !7} // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !15, type: !7) // CHECK:STDOUT: !20 = !DILocation(line: 16, column: 3, scope: !15) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/tuple/access/return_value_access.carbon b/toolchain/lower/testdata/tuple/access/return_value_access.carbon index 5ef31f8d03aa..00059fe7fae2 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -70,33 +70,33 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "return_value_access.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "return_value_access.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // 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) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{!13} // CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !10) // CHECK:STDOUT: !15 = !DILocation(line: 16, column: 16, scope: !10) // CHECK:STDOUT: !16 = !DILocation(line: 15, column: 1, scope: !10) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !13} // CHECK:STDOUT: !20 = !{!21} // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !17, type: !13) // CHECK:STDOUT: !22 = !DILocation(line: 16, column: 16, scope: !17) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !26) // CHECK:STDOUT: !24 = !DISubroutineType(types: !25) // CHECK:STDOUT: !25 = !{null, !7} // CHECK:STDOUT: !26 = !{!27} diff --git a/toolchain/lower/testdata/tuple/empty.carbon b/toolchain/lower/testdata/tuple/empty.carbon index ad44c7bf7206..85748874222b 100644 --- a/toolchain/lower/testdata/tuple/empty.carbon +++ b/toolchain/lower/testdata/tuple/empty.carbon @@ -38,14 +38,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "empty.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "empty.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/tuple/nested_tuple.carbon b/toolchain/lower/testdata/tuple/nested_tuple.carbon index 5febe32802f1..83ff6d0b0bf0 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple.carbon @@ -26,14 +26,14 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested_tuple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested_tuple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon index 04356d3e191d..8f2d705f4e1a 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon @@ -58,14 +58,14 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested_tuple_in_place.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested_tuple_in_place.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -73,21 +73,21 @@ fn G() { // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 48, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 16, column: 53, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !15} // CHECK:STDOUT: !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !12, type: !15) // CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !12) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{!24} // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !19, type: !22) // CHECK:STDOUT: !25 = !DILocation(line: 16, column: 3, scope: !19) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de30152328a91377:core.Destroy.Core", scope: null, file: !3, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !27) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de30152328a91377:core.Destroy.Core", scope: null, file: !1, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !27) // CHECK:STDOUT: !27 = !{!28} // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !26, type: !22) // CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !26) diff --git a/toolchain/lower/testdata/tuple/one_entry.carbon b/toolchain/lower/testdata/tuple/one_entry.carbon index 005f738af3e6..b339459bcaa9 100644 --- a/toolchain/lower/testdata/tuple/one_entry.carbon +++ b/toolchain/lower/testdata/tuple/one_entry.carbon @@ -58,14 +58,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "one_entry.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "one_entry.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -73,13 +73,13 @@ fn Run() -> i32 { // CHECK:STDOUT: !9 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 20, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !13 = !DISubroutineType(types: !14) // CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !{!16} // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !12, type: !7) // CHECK:STDOUT: !17 = !DILocation(line: 15, column: 3, scope: !12) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b56e66ed2f8c6490:core.Destroy.Core", scope: null, file: !3, line: 15, type: !19, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !22) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b56e66ed2f8c6490:core.Destroy.Core", scope: null, file: !1, line: 15, type: !19, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !22) // CHECK:STDOUT: !19 = !DISubroutineType(types: !20) // CHECK:STDOUT: !20 = !{null, !21} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index 58fd2c191fd8..ebe2339123eb 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -69,14 +69,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "two_entries.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "two_entries.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -85,13 +85,13 @@ fn Run() -> i32 { // CHECK:STDOUT: !10 = !DILocation(line: 14, column: 23, scope: !4) // CHECK:STDOUT: !11 = !DILocation(line: 15, column: 23, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 16, column: 3, scope: !4) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16) // CHECK:STDOUT: !14 = !DISubroutineType(types: !15) // CHECK:STDOUT: !15 = !{null, !7} // CHECK:STDOUT: !16 = !{!17} // CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !13, type: !7) // CHECK:STDOUT: !18 = !DILocation(line: 15, column: 3, scope: !13) -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !3, line: 15, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !23) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "Op", linkageName: "_COp.eff30dc40f4a53d2:core.Destroy.Core", scope: null, file: !1, line: 15, type: !20, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !23) // CHECK:STDOUT: !20 = !DISubroutineType(types: !21) // CHECK:STDOUT: !21 = !{null, !22} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/tuple/value_formation.carbon b/toolchain/lower/testdata/tuple/value_formation.carbon index 77d9d33cc47a..75b17370d5bb 100644 --- a/toolchain/lower/testdata/tuple/value_formation.carbon +++ b/toolchain/lower/testdata/tuple/value_formation.carbon @@ -92,14 +92,14 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "value_formation.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "value_formation.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 16, column: 3, scope: !4) @@ -109,14 +109,14 @@ fn F() { // CHECK:STDOUT: !11 = !DILocation(line: 18, column: 5, scope: !4) // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 17, column: 3, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !24} // CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/tuple/value_forwarding.carbon b/toolchain/lower/testdata/tuple/value_forwarding.carbon index d4bab89ab3f0..a707d814ae09 100644 --- a/toolchain/lower/testdata/tuple/value_forwarding.carbon +++ b/toolchain/lower/testdata/tuple/value_forwarding.carbon @@ -40,14 +40,14 @@ fn F(a: (i32, i32, i32), b: (i32, i32, i32)) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "value_forwarding.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "value_forwarding.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null, !7, !7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/var/export.carbon b/toolchain/lower/testdata/var/export.carbon index f05b2b31c885..034878b94462 100644 --- a/toolchain/lower/testdata/var/export.carbon +++ b/toolchain/lower/testdata/var/export.carbon @@ -59,28 +59,28 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1, !2, !3, !4} -// CHECK:STDOUT: !llvm.dbg.cu = !{!5} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !5, !6} // CHECK:STDOUT: !llvm.errno.tbaa = !{!7} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_export.carbon", directory: "") // CHECK:STDOUT: !2 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !3 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !4 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIFile(filename: "var_export.carbon", directory: "") +// CHECK:STDOUT: !5 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !6 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{!8, !8, i64 0} // CHECK:STDOUT: !8 = !{!"int", !9, i64 0} // CHECK:STDOUT: !9 = !{!"omnipotent char", !10, i64 0} // CHECK:STDOUT: !10 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !6, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{!14} // CHECK:STDOUT: !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !15 = !DILocation(line: 14, column: 10, scope: !11) // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 3, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !18, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !18, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null} // CHECK:STDOUT: !20 = !DILocation(line: 5, column: 1, scope: !17) diff --git a/toolchain/lower/testdata/var/global.carbon b/toolchain/lower/testdata/var/global.carbon index 3c36308ac534..1846b00108a9 100644 --- a/toolchain/lower/testdata/var/global.carbon +++ b/toolchain/lower/testdata/var/global.carbon @@ -71,19 +71,19 @@ var a: i32 = 1; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetA", linkageName: "_CGetA.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetA", linkageName: "_CGetA.Main", scope: null, file: !1, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 21, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !10, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !10, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DISubroutineType(types: !11) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DILocation(line: 4, column: 1, scope: !9) @@ -117,21 +117,21 @@ var a: i32 = 1; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "var_in_tuple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "var_in_tuple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 21, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 21, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 4, column: 6, scope: !11) @@ -172,21 +172,21 @@ var a: i32 = 1; // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "tuple_in_var.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetD", linkageName: "_CGetD.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "tuple_in_var.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "GetD", linkageName: "_CGetD.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 21, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GetE", linkageName: "_CGetE.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "GetE", linkageName: "_CGetE.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !10 = !DILocation(line: 7, column: 21, scope: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !12, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !12, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DILocation(line: 4, column: 1, scope: !11) @@ -217,14 +217,14 @@ var a: i32 = 1; // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "unnamed.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "unnamed.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 4, column: 1, scope: !4) @@ -245,14 +245,14 @@ var a: i32 = 1; // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "not_main_package.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Other", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "not_main_package.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Other", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 4, column: 1, scope: !4) diff --git a/toolchain/lower/testdata/var/import.carbon b/toolchain/lower/testdata/var/import.carbon index 88cc5e1a9d9f..d45440d088eb 100644 --- a/toolchain/lower/testdata/var/import.carbon +++ b/toolchain/lower/testdata/var/import.carbon @@ -63,14 +63,14 @@ fn Z() -> i32 { return z; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 4, column: 1, scope: !4) @@ -89,14 +89,14 @@ fn Z() -> i32 { return z; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "import_simple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_simple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -130,14 +130,14 @@ fn Z() -> i32 { return z; } // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "tuple_pattern.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "tuple_pattern.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !1, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 4, column: 1, scope: !4) @@ -184,25 +184,25 @@ fn Z() -> i32 { return z; } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "import_tuple_pattern.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "V", linkageName: "_CV.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "import_tuple_pattern.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "V", linkageName: "_CV.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 6, column: 24, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 6, column: 17, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "W", linkageName: "_CW.Main", scope: null, file: !3, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "W", linkageName: "_CW.Main", scope: null, file: !1, line: 7, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 24, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 7, column: 17, scope: !10) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Y", linkageName: "_CY.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Y", linkageName: "_CY.Main", scope: null, file: !1, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !14 = !DILocation(line: 9, column: 24, scope: !13) // CHECK:STDOUT: !15 = !DILocation(line: 9, column: 17, scope: !13) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Z", linkageName: "_CZ.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Z", linkageName: "_CZ.Main", scope: null, file: !1, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !17 = !DILocation(line: 10, column: 24, scope: !16) // CHECK:STDOUT: !18 = !DILocation(line: 10, column: 17, scope: !16) diff --git a/toolchain/lower/testdata/var/local.carbon b/toolchain/lower/testdata/var/local.carbon index 94b746fe55b9..a6c21e661fc3 100644 --- a/toolchain/lower/testdata/var/local.carbon +++ b/toolchain/lower/testdata/var/local.carbon @@ -56,21 +56,21 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "simple.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "simple.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 6, column: 10, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 6, column: 3, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !7} // CHECK:STDOUT: !14 = !{!15} @@ -137,31 +137,31 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "eval_init_in_place.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "eval_init_in_place.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !1, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !DILocation(line: 4, column: 41, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 4, column: 34, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 3, scope: !10) // CHECK:STDOUT: !12 = !DILocation(line: 8, column: 10, scope: !10) // CHECK:STDOUT: !13 = !DILocation(line: 8, column: 3, scope: !10) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 7, type: !15, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !18) // CHECK:STDOUT: !15 = !DISubroutineType(types: !16) // CHECK:STDOUT: !16 = !{null, !17} // CHECK:STDOUT: !17 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !18 = !{!19} // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !14, type: !17) // CHECK:STDOUT: !20 = !DILocation(line: 7, column: 3, scope: !14) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !3, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5784487ae90e2771:core.Destroy.Core", scope: null, file: !1, line: 7, type: !22, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !24) // CHECK:STDOUT: !22 = !DISubroutineType(types: !23) // CHECK:STDOUT: !23 = !{null, !7} // CHECK:STDOUT: !24 = !{!25} diff --git a/toolchain/lower/testdata/var/nested.carbon b/toolchain/lower/testdata/var/nested.carbon index 5590190e6d28..d96315164258 100644 --- a/toolchain/lower/testdata/var/nested.carbon +++ b/toolchain/lower/testdata/var/nested.carbon @@ -65,14 +65,14 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "nested.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "nested.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -85,7 +85,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !14 = !DILocation(line: 15, column: 3, scope: !4) // CHECK:STDOUT: !15 = !DILocation(line: 19, column: 10, scope: !4) // CHECK:STDOUT: !16 = !DILocation(line: 19, column: 3, scope: !4) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !20) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !20) // CHECK:STDOUT: !18 = !DISubroutineType(types: !19) // CHECK:STDOUT: !19 = !{null, !7} // CHECK:STDOUT: !20 = !{!21} diff --git a/toolchain/lower/testdata/var/param.carbon b/toolchain/lower/testdata/var/param.carbon index baaca0319976..6a48dbd2bc2c 100644 --- a/toolchain/lower/testdata/var/param.carbon +++ b/toolchain/lower/testdata/var/param.carbon @@ -78,21 +78,21 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "with_cleanup.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "with_cleanup.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 13, column: 6, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 16, column: 5, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 16, column: 3, scope: !4) // CHECK:STDOUT: !10 = !DILocation(line: 15, column: 1, scope: !4) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !15) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !15) // CHECK:STDOUT: !12 = !DISubroutineType(types: !13) // CHECK:STDOUT: !13 = !{null, !14} // CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -134,20 +134,20 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "struct_literal_cleanup.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "struct_literal_cleanup.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 11, column: 6, scope: !4) // CHECK:STDOUT: !8 = !DILocation(line: 14, column: 3, scope: !4) // CHECK:STDOUT: !9 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !3, line: 11, type: !11, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !14) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 11, type: !11, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14) // CHECK:STDOUT: !11 = !DISubroutineType(types: !12) // CHECK:STDOUT: !12 = !{null, !13} // CHECK:STDOUT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) diff --git a/toolchain/lower/testdata/var/uninitialized.carbon b/toolchain/lower/testdata/var/uninitialized.carbon index ce78f58d4593..b67fa2e595b2 100644 --- a/toolchain/lower/testdata/var/uninitialized.carbon +++ b/toolchain/lower/testdata/var/uninitialized.carbon @@ -67,14 +67,14 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "uninitialized.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "uninitialized.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !1, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{!7} // CHECK:STDOUT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -85,14 +85,14 @@ fn Run() { // CHECK:STDOUT: !12 = !DILocation(line: 18, column: 3, scope: !4) // CHECK:STDOUT: !13 = !DILocation(line: 19, column: 3, scope: !4) // CHECK:STDOUT: !14 = !DILocation(line: 13, column: 1, scope: !4) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !3, line: 15, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !19) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30d8007fdcc57f83:core.Destroy.Core", scope: null, file: !1, line: 15, type: !16, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) // CHECK:STDOUT: !16 = !DISubroutineType(types: !17) // CHECK:STDOUT: !17 = !{null, !18} // CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !19 = !{!20} // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !15, type: !18) // CHECK:STDOUT: !21 = !DILocation(line: 15, column: 3, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !3, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !25) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !25) // CHECK:STDOUT: !23 = !DISubroutineType(types: !24) // CHECK:STDOUT: !24 = !{null, !7} // CHECK:STDOUT: !25 = !{!26} diff --git a/toolchain/lower/testdata/while/break_continue.carbon b/toolchain/lower/testdata/while/break_continue.carbon index 2a6c9f9908f4..6d45ad3e21cf 100644 --- a/toolchain/lower/testdata/while/break_continue.carbon +++ b/toolchain/lower/testdata/while/break_continue.carbon @@ -65,14 +65,14 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "break_continue.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "break_continue.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !1, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 18, column: 10, scope: !4) diff --git a/toolchain/lower/testdata/while/preheader.carbon b/toolchain/lower/testdata/while/preheader.carbon index b23c8383346d..4df19705ccb4 100644 --- a/toolchain/lower/testdata/while/preheader.carbon +++ b/toolchain/lower/testdata/while/preheader.carbon @@ -76,14 +76,14 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "preheader.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "preheader.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !1, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 22, column: 10, scope: !4) diff --git a/toolchain/lower/testdata/while/unreachable_end.carbon b/toolchain/lower/testdata/while/unreachable_end.carbon index 650856d82f3e..c3ea31094d9f 100644 --- a/toolchain/lower/testdata/while/unreachable_end.carbon +++ b/toolchain/lower/testdata/while/unreachable_end.carbon @@ -57,14 +57,14 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "unreachable_end.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "unreachable_end.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 3, scope: !4) diff --git a/toolchain/lower/testdata/while/while.carbon b/toolchain/lower/testdata/while/while.carbon index 5bc6e8a5b9bc..023e4b9bfac5 100644 --- a/toolchain/lower/testdata/while/while.carbon +++ b/toolchain/lower/testdata/while/while.carbon @@ -56,14 +56,14 @@ fn While() { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} -// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: !llvm.dbg.cu = !{!0} +// CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: -// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !3 = !DIFile(filename: "while.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !1 = !DIFile(filename: "while.carbon", directory: "") +// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "While", linkageName: "_CWhile.Main", scope: null, file: !1, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !0) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{null} // CHECK:STDOUT: !7 = !DILocation(line: 20, column: 3, scope: !4)