From b227419d8d4d62c2a5a739c1cd918a6ff2ee2dfd Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Mon, 28 Sep 2026 22:39:03 +0000 Subject: [PATCH] Classify classes with no struct fields as trivially destructible (#7846) --- toolchain/check/custom_witness.cpp | 19 +- toolchain/check/testdata/array/basics.carbon | 5 +- toolchain/check/testdata/array/import.carbon | 5 +- .../testdata/array/index_not_literal.carbon | 5 +- .../array/init_dependent_bound.carbon | 5 +- toolchain/check/testdata/as/basics.carbon | 10 +- toolchain/check/testdata/as/const.carbon | 10 +- .../check/testdata/as/maybe_unformed.carbon | 10 +- toolchain/check/testdata/as/partial.carbon | 10 +- toolchain/check/testdata/as/var_init.carbon | 5 +- .../class/access/access_modifiers.carbon | 5 +- .../testdata/class/adapter/adapt_copy.carbon | 70 +- .../check/testdata/class/destroy_calls.carbon | 60 +- .../testdata/class/field/field_access.carbon | 5 +- .../class/field/field_access_in_value.carbon | 5 +- .../testdata/class/generic/import.carbon | 10 +- .../check/testdata/class/generic/init.carbon | 5 +- .../testdata/class/generic/member_type.carbon | 10 +- .../class/generic/method_deduce.carbon | 5 +- toolchain/check/testdata/class/import.carbon | 15 +- .../class/inheritance/derived_to_base.carbon | 5 +- .../class/inheritance/import_base.carbon | 5 +- toolchain/check/testdata/class/init_as.carbon | 5 +- toolchain/check/testdata/class/local.carbon | 5 +- .../check/testdata/class/method/method.carbon | 5 +- .../class/method/static_method.carbon | 5 +- .../testdata/class/method/virtual.carbon | 10 +- .../check/testdata/class/nested_name.carbon | 5 +- .../testdata/class/reorder_qualified.carbon | 5 +- toolchain/check/testdata/class/scope.carbon | 5 +- .../testdata/class/self/fail_ref_self.carbon | 5 +- toolchain/check/testdata/deduce/array.carbon | 30 +- .../check/testdata/deduce/conversion.carbon | 10 +- .../check/testdata/deduce/generic_type.carbon | 5 +- .../value_with_type_through_access.carbon | 20 +- toolchain/check/testdata/eval/call.carbon | 25 +- .../facet/call_combined_impl_witness.carbon | 5 +- ...t_class_type_to_generic_facet_value.carbon | 5 +- ...rt_class_value_to_facet_value_value.carbon | 5 +- ..._value_to_generic_facet_value_value.carbon | 15 +- ...t_value_as_type_knows_original_type.carbon | 5 +- ..._value_to_generic_facet_value_value.carbon | 10 +- ...convert_facet_value_value_to_itself.carbon | 5 +- ...uction_uses_runtime_type_conversion.carbon | 5 +- toolchain/check/testdata/for/actual.carbon | 5 +- toolchain/check/testdata/for/basic.carbon | 5 +- toolchain/check/testdata/for/pattern.carbon | 35 +- .../function/call/default_values.carbon | 10 +- .../call/fail_return_type_mismatch.carbon | 5 +- .../check/testdata/function/call/form.carbon | 15 +- .../check/testdata/function/call/i32.carbon | 5 +- .../function/call/more_param_ir.carbon | 5 +- .../check/testdata/function/call/ref.carbon | 10 +- .../fail_import_incomplete_return.carbon | 5 +- .../testdata/function/generic/deduce.carbon | 5 +- .../function/generic/resolve_used.carbon | 5 +- .../function/generic/return_slot.carbon | 5 +- toolchain/check/testdata/generic/local.carbon | 5 +- .../testdata/generic/template/convert.carbon | 30 +- .../check/testdata/generic/var_param.carbon | 5 +- toolchain/check/testdata/if/lifetime.carbon | 5 +- toolchain/check/testdata/if_expr/basic.carbon | 5 +- .../if_expr/constant_condition.carbon | 5 +- .../check/testdata/if_expr/struct.carbon | 5 +- .../testdata/impl/extend_impl_generic.carbon | 5 +- .../impl/fail_extend_impl_scope.carbon | 5 +- .../testdata/impl/fail_impl_as_scope.carbon | 5 +- toolchain/check/testdata/impl/impl_as.carbon | 5 +- .../check/testdata/impl/impl_thunk.carbon | 5 +- .../check/testdata/impl/import_thunk.carbon | 5 +- .../impl/lookup/canonical_query_self.carbon | 5 +- .../check/testdata/impl/lookup/import.carbon | 20 +- .../testdata/impl/lookup/transitive.carbon | 5 +- .../check/testdata/index/expr_category.carbon | 5 +- .../testdata/index/fail_expr_category.carbon | 5 +- .../testdata/index/fail_name_not_found.carbon | 5 +- .../testdata/interface/default_fn.carbon | 5 +- .../testdata/interface/generic_method.carbon | 35 +- .../check/testdata/interface/modifiers.carbon | 15 +- .../interop/cpp/class/import/method.carbon | 5 +- .../cpp/function/export/generic.carbon | 10 +- .../import/arithmetic_types_bridged.carbon | 85 +- .../cpp/function/import/decayed_param.carbon | 20 +- .../cpp/function/import/full_semir.carbon | 10 +- .../interop/cpp/function/import/inline.carbon | 5 +- .../cpp/function/import/pointer.carbon | 70 +- .../interop/cpp/function/import/return.carbon | 20 +- .../cpp/function/import/void_pointer.carbon | 30 +- .../testdata/interop/cpp/macros/macros.carbon | 15 +- .../long_and_long_long.darwin.carbon | 75 +- .../long_and_long_long.llp64.carbon | 90 +- .../long_and_long_long.lp64.carbon | 90 +- .../testdata/interop/cpp/range_for.carbon | 80 +- .../cpp/stdlib/initializer_list.carbon | 5 +- .../interop/cpp/type_alias/import.carbon | 5 +- toolchain/check/testdata/let/lifetime.carbon | 5 +- .../merging_with_indirections.carbon | 5 +- .../check/testdata/namespace/shadow.carbon | 5 +- .../operators/builtin/assignment.carbon | 5 +- .../fail_assignment_to_non_assignable.carbon | 5 +- .../fail_redundant_compound_access.carbon | 5 +- .../fail_type_mismatch_assignment.carbon | 5 +- .../operators/overloaded/fail_no_impl.carbon | 5 +- .../operators/overloaded/implicit_as.carbon | 5 +- .../operators/overloaded/index.carbon | 5 +- .../check/testdata/package_expr/syntax.carbon | 5 +- .../testdata/pointer/address_of_deref.carbon | 5 +- .../testdata/pointer/address_of_lvalue.carbon | 5 +- toolchain/check/testdata/pointer/basic.carbon | 5 +- .../fail_return_with_returned_var.carbon | 5 +- .../return/fail_returned_var_shadow.carbon | 5 +- .../return/fail_returned_var_type.carbon | 5 +- .../return/import_convert_function.carbon | 40 +- .../check/testdata/return/returned_var.carbon | 5 +- .../testdata/return/returned_var_scope.carbon | 5 +- .../struct/literal_member_access.carbon | 5 +- .../struct/nested_struct_in_place.carbon | 5 +- .../testdata/tuple/in_place_tuple_init.carbon | 10 +- .../testdata/var/destroy_control_flow.carbon | 25 +- toolchain/check/testdata/var/lifetime.carbon | 5 +- .../check/testdata/var/var_pattern.carbon | 10 +- .../check/testdata/while/lifetime.carbon | 5 +- .../compile/optimize/optimize_debug.carbon | 60 +- .../compile/optimize/optimize_default.carbon | 60 +- .../compile/optimize/optimize_none.carbon | 99 +- .../compile/optimize/optimize_size.carbon | 99 +- .../compile/optimize/optimize_speed.carbon | 70 +- .../testdata/array/array_in_place.carbon | 37 +- .../testdata/array/assign_return_value.carbon | 39 +- toolchain/lower/testdata/array/base.carbon | 100 +- .../testdata/array/function_param.carbon | 27 +- toolchain/lower/testdata/array/iterate.carbon | 356 +++-- toolchain/lower/testdata/array/layout.carbon | 55 +- toolchain/lower/testdata/builtins/char.carbon | 30 +- toolchain/lower/testdata/builtins/cpp.carbon | 53 +- .../testdata/builtins/maybe_unformed.carbon | 101 +- toolchain/lower/testdata/class/adapt.carbon | 90 +- toolchain/lower/testdata/class/basic.carbon | 41 +- toolchain/lower/testdata/class/convert.carbon | 61 +- toolchain/lower/testdata/class/field.carbon | 287 ++-- toolchain/lower/testdata/class/generic.carbon | 317 ++--- toolchain/lower/testdata/class/static.carbon | 53 +- toolchain/lower/testdata/class/virtual.carbon | 1231 ++++++++--------- toolchain/lower/testdata/for/bindings.carbon | 276 ++-- .../lower/testdata/for/break_continue.carbon | 374 +++-- toolchain/lower/testdata/for/for.carbon | 378 +++-- .../lower/testdata/function/call/form.carbon | 195 ++- .../lower/testdata/function/call/i32.carbon | 15 +- .../testdata/function/call/ref_param.carbon | 15 +- .../testdata/function/call/ref_return.carbon | 15 +- .../call/tuple_param_with_return_slot.carbon | 27 +- .../testdata/function/call/var_param.carbon | 15 +- .../function/definition/destroy.carbon | 207 ++- .../function/definition/var_param.carbon | 38 +- .../testdata/function/generic/call.carbon | 128 +- .../function/generic/call_basic.carbon | 527 ++++--- .../function/generic/call_basic_depth.carbon | 69 +- .../function/generic/call_deref_ptr.carbon | 180 ++- .../call_different_impls_with_const.carbon | 95 +- .../generic/call_different_specific.carbon | 160 +-- .../function/generic/call_method.carbon | 50 +- .../generic/call_recursive_basic.carbon | 213 ++- .../generic/call_recursive_diamond.carbon | 378 +++-- .../generic/call_recursive_mutual.carbon | 240 ++-- .../generic/call_recursive_reorder.carbon | 74 +- .../call_recursive_reorder_more.carbon | 358 +++-- .../generic/call_recursive_sccs_deep.carbon | 596 ++++---- .../generic/call_specific_in_class.carbon | 433 +++--- .../testdata/function/generic/import.carbon | 59 +- .../generic/import_core_witness.carbon | 59 +- .../function/generic/import_unused_def.carbon | 94 +- .../generic/type_representation.carbon | 385 +++--- toolchain/lower/testdata/impl/impl.carbon | 58 +- .../lower/testdata/impl/import_facet.carbon | 53 +- .../lower/testdata/impl/import_thunk.carbon | 416 +++--- toolchain/lower/testdata/impl/thunk.carbon | 265 ++-- .../index/array_element_access.carbon | 39 +- .../lower/testdata/interface/modifiers.carbon | 388 +++--- .../interop/cpp/class/export/class.carbon | 254 ++-- .../class/export/destroy_from_thunk.carbon | 43 +- .../interop/cpp/class/export/method.carbon | 309 ++--- .../cpp/class/import/conversion.carbon | 39 +- .../interop/cpp/class/import/method.carbon | 67 +- .../cpp/function/export/constructor.carbon | 65 +- .../cpp/function/export/generic.carbon | 136 +- .../cpp/function/import/function_decl.carbon | 25 +- .../cpp/function/import/import_inline.carbon | 29 +- .../cpp/function/import/parameters.carbon | 538 ++++--- .../interop/cpp/function/import/return.carbon | 592 ++++---- .../testdata/interop/cpp/issue7142.carbon | 63 +- .../lower/testdata/interop/cpp/nullptr.carbon | 258 ++-- .../lower/testdata/interop/cpp/pointer.carbon | 544 ++++---- .../testdata/interop/cpp/reference.carbon | 406 +++--- ...td_initializer_list_pointer_pointer.carbon | 255 ++-- .../std_initializer_list_pointer_size.carbon | 257 ++-- .../lower/testdata/interop/cpp/void.carbon | 536 ++++--- .../lower/testdata/let/copy_value_rep.carbon | 37 +- toolchain/lower/testdata/let/tuple.carbon | 39 +- .../testdata/operators/assignment.carbon | 77 +- .../lower/testdata/operators/increment.carbon | 93 +- .../imported_type_completeness.carbon | 298 ++-- .../separate_compilation_witness.carbon | 980 ++++++------- .../testdata/pointer/address_of_field.carbon | 27 +- .../testdata/pointer/address_of_unused.carbon | 15 +- toolchain/lower/testdata/pointer/basic.carbon | 15 +- .../primitives/numeric_literals.carbon | 62 +- .../lower/testdata/primitives/optional.carbon | 968 ++++++------- .../testdata/return/return_var_byval.carbon | 15 +- toolchain/lower/testdata/return/var.carbon | 15 +- toolchain/lower/testdata/struct/layout.carbon | 515 +++---- .../testdata/struct/member_access.carbon | 48 +- .../struct/nested_struct_in_place.carbon | 37 +- .../lower/testdata/struct/one_entry.carbon | 27 +- .../lower/testdata/struct/two_entries.carbon | 27 +- .../lower/testdata/template/convert.carbon | 904 ++++++------ .../lower/testdata/template/merging.carbon | 337 ++--- .../tuple/access/element_access.carbon | 29 +- .../tuple/access/return_value_access.carbon | 27 +- .../tuple/nested_tuple_in_place.carbon | 37 +- .../lower/testdata/tuple/one_entry.carbon | 27 +- .../lower/testdata/tuple/two_entries.carbon | 27 +- .../testdata/tuple/value_formation.carbon | 27 +- .../testdata/var/destroy_control_flow.carbon | 461 +++--- toolchain/lower/testdata/var/local.carbon | 142 +- toolchain/lower/testdata/var/nested.carbon | 15 +- toolchain/lower/testdata/var/param.carbon | 78 +- .../lower/testdata/var/uninitialized.carbon | 38 +- 227 files changed, 9144 insertions(+), 12453 deletions(-) diff --git a/toolchain/check/custom_witness.cpp b/toolchain/check/custom_witness.cpp index 5bac1b30d60a..b93b171f6e3d 100644 --- a/toolchain/check/custom_witness.cpp +++ b/toolchain/check/custom_witness.cpp @@ -217,9 +217,22 @@ static auto CanDestroyClass(Context& context, SemIR::LocId loc_id, class_info.GetObjectRepr(context.sem_ir(), class_type.specific_id); } - return HasWitnessForOneField(context, loc_id, - context.types().GetTypeInstId(object_repr_id), - query_specific_interface); + auto has_witness = HasWitnessForOneField( + context, loc_id, context.types().GetTypeInstId(object_repr_id), + query_specific_interface); + if (has_witness == DestroyFormat::NoDestroy) { + return DestroyFormat::NoDestroy; + } + + if (class_info.GetStructTypeFields(context.sem_ir(), class_type.specific_id) + .empty()) { + return DestroyFormat::Trivial; + } + + // TODO: check that a class' base has trivial destruction. + // TODO: check that a class' subobjects have trivial destruction. + + return DestroyFormat::NonTrivial; } // Returns true if the `Self` should impl `Destroy`. This will recurse into impl diff --git a/toolchain/check/testdata/array/basics.carbon b/toolchain/check/testdata/array/basics.carbon index 6731e9162587..e44358e96530 100644 --- a/toolchain/check/testdata/array/basics.carbon +++ b/toolchain/check/testdata/array/basics.carbon @@ -328,10 +328,7 @@ var a: array(1, 1); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index b0dcaa298bf5..91ab95c09bfb 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -179,10 +179,7 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index f9846a2056f0..c53c1fd09d96 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -252,10 +252,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 069b8534243f..13d74524c770 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -404,10 +404,7 @@ fn H() { G(3); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/basics.carbon b/toolchain/check/testdata/as/basics.carbon index 63f0a9a620bd..63751d31022f 100644 --- a/toolchain/check/testdata/as/basics.carbon +++ b/toolchain/check/testdata/as/basics.carbon @@ -337,10 +337,7 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_40.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_40.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_40.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -521,10 +518,7 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/const.carbon b/toolchain/check/testdata/as/const.carbon index 60b8906b0e2a..04ab48b6ed25 100644 --- a/toolchain/check/testdata/as/const.carbon +++ b/toolchain/check/testdata/as/const.carbon @@ -261,10 +261,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -397,10 +394,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/maybe_unformed.carbon b/toolchain/check/testdata/as/maybe_unformed.carbon index 7292035421b6..774f6bdcb2e7 100644 --- a/toolchain/check/testdata/as/maybe_unformed.carbon +++ b/toolchain/check/testdata/as/maybe_unformed.carbon @@ -388,10 +388,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -416,10 +413,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_3.4(%self.param: ref %MaybeUnformed.198) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_3.4(%self.param: ref %MaybeUnformed.198) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_3.4(%self.param: ref %MaybeUnformed.198) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/partial.carbon b/toolchain/check/testdata/as/partial.carbon index 11a60e9496fd..ff1bd6b1162b 100644 --- a/toolchain/check/testdata/as/partial.carbon +++ b/toolchain/check/testdata/as/partial.carbon @@ -254,10 +254,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %.d74) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %.d74) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %.d74) = "no_op"; // CHECK:STDOUT: @@ -401,10 +398,7 @@ fn Use() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/var_init.carbon b/toolchain/check/testdata/as/var_init.carbon index 0f2bb7994d82..19ae1158d890 100644 --- a/toolchain/check/testdata/as/var_init.carbon +++ b/toolchain/check/testdata/as/var_init.carbon @@ -128,10 +128,7 @@ fn Convert(unused t: ()) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/access/access_modifiers.carbon b/toolchain/check/testdata/class/access/access_modifiers.carbon index f326656e7509..a1fc6217374d 100644 --- a/toolchain/check/testdata/class/access/access_modifiers.carbon +++ b/toolchain/check/testdata/class/access/access_modifiers.carbon @@ -361,10 +361,7 @@ class A { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_36.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_36.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_36.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index 5481a38ea2cf..13284a8019f8 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -440,10 +440,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -454,10 +451,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.3(%self.param: ref %AdaptCopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.3(%self.param: ref %AdaptCopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.3(%self.param: ref %AdaptCopyable) = "no_op"; // CHECK:STDOUT: @@ -504,10 +498,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_3.2(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: @@ -899,10 +890,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -927,10 +915,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %AdaptTuple) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %AdaptTuple) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %AdaptTuple) = "no_op"; // CHECK:STDOUT: @@ -1043,10 +1028,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: @@ -1246,10 +1228,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %Noncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.2(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: @@ -1260,10 +1239,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.3(%self.param: ref %AdaptNoncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.3(%self.param: ref %AdaptNoncopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.3(%self.param: ref %AdaptNoncopyable) = "no_op"; // CHECK:STDOUT: @@ -1562,10 +1538,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1587,10 +1560,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.4(%self.param: ref %Noncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.4(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.4(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: @@ -1615,10 +1585,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.6(%self.param: ref %AdaptNoncopyableIndirect) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.6(%self.param: ref %AdaptNoncopyableIndirect) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.6(%self.param: ref %AdaptNoncopyableIndirect) = "no_op"; // CHECK:STDOUT: @@ -1994,10 +1961,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -2022,10 +1986,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %AdaptStruct) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %AdaptStruct) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %AdaptStruct) = "no_op"; // CHECK:STDOUT: @@ -2138,10 +2099,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 42a40d1802e9..1a135842502e 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -274,10 +274,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -288,10 +285,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: @@ -302,10 +296,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: @@ -499,10 +490,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_5.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_5.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_5.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -513,10 +501,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: @@ -527,10 +512,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: @@ -694,10 +676,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_10.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_10.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_10.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: @@ -708,10 +687,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: @@ -722,10 +698,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -838,10 +811,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %D.dee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %D.dee) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %D.dee) = "no_op"; // CHECK:STDOUT: @@ -1009,10 +979,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8e) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.d8e) = "no_op"; // CHECK:STDOUT: @@ -1239,10 +1206,7 @@ fn G() { F({}); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8efcc.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.d8efcc.1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.d8efcc.1) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field/field_access.carbon b/toolchain/check/testdata/class/field/field_access.carbon index 597d529a9332..0753c8e4a89e 100644 --- a/toolchain/check/testdata/class/field/field_access.carbon +++ b/toolchain/check/testdata/class/field/field_access.carbon @@ -325,10 +325,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field/field_access_in_value.carbon b/toolchain/check/testdata/class/field/field_access_in_value.carbon index 35c210c1fa8a..32166f161463 100644 --- a/toolchain/check/testdata/class/field/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field/field_access_in_value.carbon @@ -334,10 +334,7 @@ fn Test() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 4ddffff7d1f3..b0613e59d8c2 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -745,10 +745,7 @@ class Class(U: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1074,10 +1071,7 @@ class Class(U: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 97213f94897a..aa8ebe254d49 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -442,10 +442,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_19.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_19.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_19.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index 7ab6de0529a7..18516a53554e 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -462,10 +462,7 @@ fn Test() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1056,10 +1053,7 @@ fn Test() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %C.b7f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %C.b7f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %C.b7f) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index cd4cd403e4f4..7a4cd70f1bf4 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -511,10 +511,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc29_25.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc29_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc29_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index b4814ba014ca..b5cf6cee6631 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -683,10 +683,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %ForwardDeclared.08bd4c.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %ForwardDeclared.08bd4c.1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %ForwardDeclared.08bd4c.1) = "no_op"; // CHECK:STDOUT: @@ -708,10 +705,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -750,10 +744,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Empty) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Empty) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %Empty) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance/derived_to_base.carbon b/toolchain/check/testdata/class/inheritance/derived_to_base.carbon index d71ab23e3e3c..1e038e1eee39 100644 --- a/toolchain/check/testdata/class/inheritance/derived_to_base.carbon +++ b/toolchain/check/testdata/class/inheritance/derived_to_base.carbon @@ -640,10 +640,7 @@ fn PassPartialB(b: partial B) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance/import_base.carbon b/toolchain/check/testdata/class/inheritance/import_base.carbon index ef835a6cb927..e5d668481479 100644 --- a/toolchain/check/testdata/class/inheritance/import_base.carbon +++ b/toolchain/check/testdata/class/inheritance/import_base.carbon @@ -460,10 +460,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index cb8a0c410f92..17726e01b07c 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -224,10 +224,7 @@ fn G() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_28.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_28.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_28.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index bbbb73dd7450..8e0e5a420327 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -304,10 +304,7 @@ class A { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method/method.carbon b/toolchain/check/testdata/class/method/method.carbon index 70609bc6674b..f11c9bf16ed4 100644 --- a/toolchain/check/testdata/class/method/method.carbon +++ b/toolchain/check/testdata/class/method/method.carbon @@ -526,10 +526,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc39_20.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc39_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc39_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method/static_method.carbon b/toolchain/check/testdata/class/method/static_method.carbon index 1a359f45b0b6..9eba25f63302 100644 --- a/toolchain/check/testdata/class/method/static_method.carbon +++ b/toolchain/check/testdata/class/method/static_method.carbon @@ -192,10 +192,7 @@ fn Run() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %Class) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.2(%self.param: ref %Class) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method/virtual.carbon b/toolchain/check/testdata/class/method/virtual.carbon index a9e8e5455770..96d859fd68d1 100644 --- a/toolchain/check/testdata/class/method/virtual.carbon +++ b/toolchain/check/testdata/class/method/virtual.carbon @@ -1372,10 +1372,7 @@ class T2(G2: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.3(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1701,10 +1698,7 @@ class T2(G2: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_28.2(%self.param: ref %T2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_28.2(%self.param: ref %T2) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_28.2(%self.param: ref %T2) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 855e255b8475..d3a39119ebec 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -296,10 +296,7 @@ fn G(o: Outer) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 5f962b826116..519defca07ca 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -585,10 +585,7 @@ class A { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_7.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index d45438d96c6d..d0a8eecdac65 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -266,10 +266,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self/fail_ref_self.carbon b/toolchain/check/testdata/class/self/fail_ref_self.carbon index 4a9964358dae..fd8d3915f392 100644 --- a/toolchain/check/testdata/class/self/fail_ref_self.carbon +++ b/toolchain/check/testdata/class/self/fail_ref_self.carbon @@ -208,10 +208,7 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_8.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_8.2(%self.param: ref %Class) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_8.2(%self.param: ref %Class) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 17b7052a8af6..f0b9201f2ae9 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -403,10 +403,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -750,10 +747,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1041,10 +1035,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1358,10 +1349,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1718,10 +1706,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: @@ -2066,10 +2051,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/conversion.carbon b/toolchain/check/testdata/deduce/conversion.carbon index 735b0f17a067..dd0337a63c1a 100644 --- a/toolchain/check/testdata/deduce/conversion.carbon +++ b/toolchain/check/testdata/deduce/conversion.carbon @@ -203,10 +203,7 @@ fn G(a: A) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_8.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_8.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_8.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: @@ -316,10 +313,7 @@ fn G(a: A) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_9.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 4bbbd4ef23ba..374807ba0c61 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -1090,10 +1090,7 @@ fn G() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_15.2(%self.param: ref %WithNontype.888) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_15.2(%self.param: ref %WithNontype.888) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_15.2(%self.param: ref %WithNontype.888) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index ac0e9cccaa43..3b79fc5cd1ec 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -363,10 +363,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_30.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_30.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_30.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -377,10 +374,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.210) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.210) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.210) = "no_op"; // CHECK:STDOUT: @@ -694,10 +688,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_33.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_33.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_33.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -708,10 +699,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.512) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.512) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.512) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/call.carbon b/toolchain/check/testdata/eval/call.carbon index 21dc85da786b..d81ac902d922 100644 --- a/toolchain/check/testdata/eval/call.carbon +++ b/toolchain/check/testdata/eval/call.carbon @@ -345,10 +345,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -493,10 +490,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_5.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -645,10 +639,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -873,10 +864,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_32.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_32.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_32.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1014,10 +1002,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 73ae89c29fbb..8ba4b9b5de1a 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -470,10 +470,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc45_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc45_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc45_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon index b49aae2f4ea5..9408c7589a00 100644 --- a/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon @@ -697,10 +697,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_38.2(%self.param: ref %GenericParam) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_38.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_38.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon index ab2f580a858f..b5ea09d079a4 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon @@ -228,10 +228,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_17.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_17.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_17.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index 226b9cd684a8..87b3f7be60e0 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -458,10 +458,7 @@ fn B() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_44.2(%self.param: ref %GenericParam) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_44.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_44.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: @@ -472,10 +469,7 @@ fn B() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_24(%self.param: ref %ImplsGeneric) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_24(%self.param: ref %ImplsGeneric) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_24(%self.param: ref %ImplsGeneric) = "no_op"; // CHECK:STDOUT: @@ -881,10 +875,7 @@ fn B() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon index d1b14cdc8998..098c69ad6adf 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon @@ -274,10 +274,7 @@ fn F[A: J, B: A](x: C(A, B)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_8.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_8.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_8.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon index 139629e20321..7c55601f9ebe 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon @@ -572,10 +572,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_31.2(%self.param: ref %Grass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_31.2(%self.param: ref %Grass) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_31.2(%self.param: ref %Grass) = "no_op"; // CHECK:STDOUT: @@ -586,10 +583,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_19(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_19(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_19(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon index 3eab5f95dd43..76291d7fa0a0 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon @@ -279,10 +279,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_19.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_19.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_19.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon index 6fe4a7194414..d09dc1d2fae0 100644 --- a/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon +++ b/toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon @@ -370,10 +370,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc40_19.2(%self.param: ref %RuntimeConvertTo) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc40_19.2(%self.param: ref %RuntimeConvertTo) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc40_19.2(%self.param: ref %RuntimeConvertTo) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 95effd6e3cc5..9ddcd3fbfdd2 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -1269,10 +1269,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index f6521da9a414..5c17548d3d94 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -383,10 +383,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_20.2(%self.param: ref %TrivialRange) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_20.2(%self.param: ref %TrivialRange) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_20.2(%self.param: ref %TrivialRange) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index 8b287e89c037..0b95bcc9604d 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -416,10 +416,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_36.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -469,10 +466,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_35(%self.param: ref %EmptyRange.b10) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_35(%self.param: ref %EmptyRange.b10) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_35(%self.param: ref %EmptyRange.b10) = "no_op"; // CHECK:STDOUT: @@ -798,10 +792,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.3(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.3(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_40.3(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -840,10 +831,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_39(%self.param: ref %EmptyRange.b10) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_39(%self.param: ref %EmptyRange.b10) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_39(%self.param: ref %EmptyRange.b10) = "no_op"; // CHECK:STDOUT: @@ -1225,10 +1213,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_60(%self.param: ref %EmptyRange.d81) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_60(%self.param: ref %EmptyRange.d81) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_60(%self.param: ref %EmptyRange.d81) = "no_op"; // CHECK:STDOUT: @@ -1580,10 +1565,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1647,10 +1629,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48(%self.param: ref %EmptyRange.8d3) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48(%self.param: ref %EmptyRange.8d3) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_48(%self.param: ref %EmptyRange.8d3) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/default_values.carbon b/toolchain/check/testdata/function/call/default_values.carbon index 84f40aeee1d2..b68969246c42 100644 --- a/toolchain/check/testdata/function/call/default_values.carbon +++ b/toolchain/check/testdata/function/call/default_values.carbon @@ -189,10 +189,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_6.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -366,10 +363,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_6.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index eafd3023d438..59dd39ceef5e 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -193,10 +193,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/form.carbon b/toolchain/check/testdata/function/call/form.carbon index 37898e4c1838..4041749f9df5 100644 --- a/toolchain/check/testdata/function/call/form.carbon +++ b/toolchain/check/testdata/function/call/form.carbon @@ -460,10 +460,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc4_7.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc4_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc4_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -722,10 +719,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_7.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1118,10 +1112,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.3(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index ddf1cb43e059..58f0a1f66785 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -209,10 +209,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index c261229dbb67..e7285c19c42b 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -236,10 +236,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/ref.carbon b/toolchain/check/testdata/function/call/ref.carbon index b9b73046b555..4169475cd8b4 100644 --- a/toolchain/check/testdata/function/call/ref.carbon +++ b/toolchain/check/testdata/function/call/ref.carbon @@ -247,10 +247,7 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -396,10 +393,7 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon index ef36b6951ccf..c06de5cdab96 100644 --- a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon @@ -354,10 +354,7 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_17.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_17.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc33_17.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 690e38ab0736..d1ca8eca2c81 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -773,10 +773,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_37.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index be13f08aa504..af2ee296f954 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -227,10 +227,7 @@ fn CallNegative() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i0) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %i0) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index befac8bc3276..8312d6dff040 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -397,10 +397,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 274529b9cfbe..eb477aad8f61 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -289,10 +289,7 @@ class C(C: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index 0d703a8cf223..abdb99b5799b 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -592,10 +592,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -791,10 +788,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1188,10 +1182,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -1230,10 +1221,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.5(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: @@ -1828,10 +1816,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -1870,10 +1855,7 @@ fn Test(d: D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.5(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/var_param.carbon b/toolchain/check/testdata/generic/var_param.carbon index f87a71174c10..d3fee729ccaa 100644 --- a/toolchain/check/testdata/generic/var_param.carbon +++ b/toolchain/check/testdata/generic/var_param.carbon @@ -190,10 +190,7 @@ fn Test(x: i32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_24.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_24.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_24.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/lifetime.carbon b/toolchain/check/testdata/if/lifetime.carbon index 79003cf9c00d..426d7f0ffcfd 100644 --- a/toolchain/check/testdata/if/lifetime.carbon +++ b/toolchain/check/testdata/if/lifetime.carbon @@ -126,10 +126,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_12.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_12.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_12.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 0d533ca64592..ff9cf1d5e128 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -265,10 +265,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index f1976d37c457..8e28f6181a66 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -468,10 +468,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index ef102113edd5..7ff9c7d60d52 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -262,10 +262,7 @@ fn F(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 80a929ca1c1d..d005f7f671f9 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -460,10 +460,7 @@ class X(U: type) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_27.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_27.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_27.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index cb46845cb639..94426192e62f 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -398,10 +398,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_7.2(%self.param: ref %Point) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index e87d81bb183a..1902695a5ea2 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -542,10 +542,7 @@ class X { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc29_7.2(%self.param: ref %Point) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc29_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc29_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 5d49a98ca1fe..61d8a41d28cf 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -197,10 +197,7 @@ class C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index 986dc37f2ab7..8c33473a00b9 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -1228,10 +1228,7 @@ impl () as I({}) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_14.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_14.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_14.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 0b89ab07fd60..83a9b8b57690 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -725,10 +725,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_16.2(%self.param: ref %C.2c9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_16.2(%self.param: ref %C.2c9) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_16.2(%self.param: ref %C.2c9) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 21890f2d66b6..1c52ca6eab52 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -522,10 +522,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc40_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc40_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc40_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index ecd49a14cd4e..c83f4cb5a4a4 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -2031,10 +2031,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.591) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.591) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.591) = "no_op"; // CHECK:STDOUT: @@ -2354,10 +2351,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.591) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.591) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.591) = "no_op"; // CHECK:STDOUT: @@ -2690,10 +2684,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.21c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.21c) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.21c) = "no_op"; // CHECK:STDOUT: @@ -3007,10 +2998,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.21c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.21c) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.21c) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index 8f0491fed945..805087deac05 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -492,10 +492,7 @@ fn Call() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 91daa6820afc..5aeeaa2beb53 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -388,10 +388,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 2348d24eb845..aaca6539642b 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -372,10 +372,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_5.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index f9097da29f1b..86b43e0b5f7b 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -134,10 +134,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index fe4fbd6b3aa7..6988ba27a9ab 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -240,10 +240,7 @@ fn Call() { ().(I.G)(); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index ccf63031c28a..f62a1c34a775 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -711,10 +711,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -725,10 +722,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.3(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.3(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.3(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: @@ -764,10 +758,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22(%self.param: ref %Z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: @@ -1722,10 +1713,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -1736,10 +1724,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.3(%self.param: ref %Y1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.3(%self.param: ref %Y1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.3(%self.param: ref %Y1) = "no_op"; // CHECK:STDOUT: @@ -1750,10 +1735,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.4(%self.param: ref %Y2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.4(%self.param: ref %Y2) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.4(%self.param: ref %Y2) = "no_op"; // CHECK:STDOUT: @@ -1778,10 +1760,7 @@ fn CallIndirect() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.6(%self.param: ref %Z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.6(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.6(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/modifiers.carbon b/toolchain/check/testdata/interface/modifiers.carbon index 36d13d99cefb..6166c53329ee 100644 --- a/toolchain/check/testdata/interface/modifiers.carbon +++ b/toolchain/check/testdata/interface/modifiers.carbon @@ -979,10 +979,7 @@ interface C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1258,10 +1255,7 @@ interface C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: @@ -1481,10 +1475,7 @@ interface C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/import/method.carbon b/toolchain/check/testdata/interop/cpp/class/import/method.carbon index 58172fcda9bd..d7b68a3bff4d 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/method.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/method.carbon @@ -697,10 +697,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/export/generic.carbon b/toolchain/check/testdata/interop/cpp/function/export/generic.carbon index 1ff2a4421839..d453de7e8ac0 100644 --- a/toolchain/check/testdata/interop/cpp/function/export/generic.carbon +++ b/toolchain/check/testdata/interop/cpp/function/export/generic.carbon @@ -527,10 +527,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_9.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: @@ -548,10 +545,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/arithmetic_types_bridged.carbon b/toolchain/check/testdata/interop/cpp/function/import/arithmetic_types_bridged.carbon index 94d1bcab6595..9bbd240021ad 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/arithmetic_types_bridged.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/arithmetic_types_bridged.carbon @@ -902,10 +902,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %i8) = "no_op"; // CHECK:STDOUT: @@ -1062,10 +1059,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %u8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: @@ -1230,10 +1224,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %u8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: @@ -1244,10 +1235,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.3(%self.param: ref %char) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.3(%self.param: ref %char) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.3(%self.param: ref %char) = "no_op"; // CHECK:STDOUT: @@ -1539,10 +1527,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -1699,10 +1684,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -1876,10 +1858,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -2037,10 +2016,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -2198,10 +2174,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -2359,10 +2332,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -2520,10 +2490,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -2680,10 +2647,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f16.907) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f16.907) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_15.2(%self.param: ref %f16.907) = "no_op"; // CHECK:STDOUT: @@ -2840,10 +2804,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_15.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -3000,10 +2961,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f64.dc1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_15.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: @@ -3160,10 +3118,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f128.e39) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_15.2(%self.param: ref %f128.e39) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_15.2(%self.param: ref %f128.e39) = "no_op"; // CHECK:STDOUT: @@ -3364,10 +3319,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_37.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_37.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_37.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -3510,10 +3462,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_38.2(%self.param: ref %f64.dc1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_38.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_38.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon b/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon index dce8e07f677d..1f26bb5e308e 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon @@ -430,10 +430,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.2(%self.param: ref %MaybeUnformed.729) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.2(%self.param: ref %MaybeUnformed.729) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_18.2(%self.param: ref %MaybeUnformed.729) = "no_op"; // CHECK:STDOUT: @@ -444,10 +441,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.3(%self.param: ref %Optional.5b3) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.3(%self.param: ref %Optional.5b3) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_18.3(%self.param: ref %Optional.5b3) = "no_op"; // CHECK:STDOUT: @@ -469,10 +463,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -693,10 +684,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon b/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon index 95e2682a69fc..144aa8486e07 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon @@ -258,10 +258,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_13.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_13.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -517,10 +514,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_37.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_37.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_37.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/inline.carbon b/toolchain/check/testdata/interop/cpp/function/import/inline.carbon index 9769e8bfba51..0a832ba6216e 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/inline.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/inline.carbon @@ -421,10 +421,7 @@ fn MyF() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_41.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_41.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_41.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon b/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon index b6d86bf5b614..5036a22496fa 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon @@ -1509,10 +1509,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) = "no_op"; // CHECK:STDOUT: @@ -1523,10 +1520,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.7c0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.7c0) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.7c0) = "no_op"; // CHECK:STDOUT: @@ -1760,10 +1754,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.9ee) = "no_op"; // CHECK:STDOUT: @@ -1774,10 +1765,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.7c0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.7c0) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.7c0) = "no_op"; // CHECK:STDOUT: @@ -2155,10 +2143,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.2(%self.param: ref %MaybeUnformed.839) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_26.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: @@ -2169,10 +2154,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.3(%self.param: ref %Optional.e08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_26.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: @@ -2379,10 +2361,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.2(%self.param: ref %MaybeUnformed.839) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_66.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: @@ -2393,10 +2372,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.3(%self.param: ref %Optional.e08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_66.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: @@ -2642,10 +2618,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.2(%self.param: ref %MaybeUnformed.839) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_68.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: @@ -2656,10 +2629,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.3(%self.param: ref %Optional.e08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_68.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: @@ -2850,10 +2820,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.2(%self.param: ref %MaybeUnformed.839) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_49.2(%self.param: ref %MaybeUnformed.839) = "no_op"; // CHECK:STDOUT: @@ -2864,10 +2831,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.3(%self.param: ref %Optional.e08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_49.3(%self.param: ref %Optional.e08) = "no_op"; // CHECK:STDOUT: @@ -3280,10 +3244,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.f45) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.f45) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.f45) = "no_op"; // CHECK:STDOUT: @@ -3294,10 +3255,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.1ac) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.1ac) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.1ac) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/return.carbon b/toolchain/check/testdata/interop/cpp/function/import/return.carbon index 42ebbcadae98..a4220f24f261 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/return.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/return.carbon @@ -231,10 +231,7 @@ fn Var() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_22.2(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_22.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_22.2(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: @@ -393,10 +390,7 @@ fn Var() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %MaybeUnformed.174) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: @@ -407,10 +401,7 @@ fn Var() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.3(%self.param: ref %Cpp.nullptr_t) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.3(%self.param: ref %Cpp.nullptr_t) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.3(%self.param: ref %Cpp.nullptr_t) = "no_op"; // CHECK:STDOUT: @@ -648,10 +639,7 @@ fn Var() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon b/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon index 9de35fd7da45..4f13468195dc 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon @@ -381,10 +381,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.2(%self.param: ref %MaybeUnformed.174) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_26.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: @@ -395,10 +392,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.3(%self.param: ref %Optional.14b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_26.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: @@ -603,10 +597,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.2(%self.param: ref %MaybeUnformed.174) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_52.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: @@ -617,10 +608,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.3(%self.param: ref %Optional.14b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_52.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: @@ -816,10 +804,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.2(%self.param: ref %MaybeUnformed.174) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_73.2(%self.param: ref %MaybeUnformed.174) = "no_op"; // CHECK:STDOUT: @@ -830,10 +815,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.3(%self.param: ref %Optional.14b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_73.3(%self.param: ref %Optional.14b) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/macros/macros.carbon b/toolchain/check/testdata/interop/cpp/macros/macros.carbon index 3fc63accc626..0b4ab5487ff2 100644 --- a/toolchain/check/testdata/interop/cpp/macros/macros.carbon +++ b/toolchain/check/testdata/interop/cpp/macros/macros.carbon @@ -1280,10 +1280,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -2085,10 +2082,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.729) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.729) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.729) = "no_op"; // CHECK:STDOUT: @@ -2099,10 +2093,7 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.5b3) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.5b3) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.5b3) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon index 10646a7ba02c..151359c5de54 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.darwin.carbon @@ -860,10 +860,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1125,10 +1122,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1552,10 +1546,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1761,10 +1752,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -1775,10 +1763,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -3412,10 +3397,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -3426,10 +3408,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4028,10 +4007,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4042,10 +4018,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4247,10 +4220,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4421,10 +4391,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4435,10 +4402,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4842,10 +4806,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -5051,10 +5012,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: @@ -5065,10 +5023,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.unsigned_long) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon index a1142b030222..bd0bfea54f6e 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.llp64.carbon @@ -926,10 +926,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1196,10 +1193,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1643,10 +1637,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1852,10 +1843,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -1866,10 +1854,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -3682,10 +3667,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -3696,10 +3678,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4244,10 +4223,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -4258,10 +4234,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4446,10 +4419,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -4460,10 +4430,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4686,10 +4653,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -4700,10 +4664,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -4874,10 +4835,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -4888,10 +4846,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: @@ -5317,10 +5272,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -5526,10 +5478,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: @@ -5540,10 +5489,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.unsigned_long) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon index c6bc58cde1f7..a1b385e7c831 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/long_and_long_long.lp64.carbon @@ -874,10 +874,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1144,10 +1141,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1568,10 +1562,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -1777,10 +1768,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -1791,10 +1779,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -3390,10 +3375,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -3404,10 +3386,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -3952,10 +3931,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -3966,10 +3942,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -4154,10 +4127,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4168,10 +4138,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -4394,10 +4361,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4408,10 +4372,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -4582,10 +4543,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: @@ -4596,10 +4554,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: @@ -5026,10 +4981,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %f32.c73) = "no_op"; // CHECK:STDOUT: @@ -5235,10 +5187,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: @@ -5249,10 +5198,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Cpp.unsigned_long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Cpp.unsigned_long_long) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/range_for.carbon b/toolchain/check/testdata/interop/cpp/range_for.carbon index 7a2ae04f25ea..2b8bd37b330a 100644 --- a/toolchain/check/testdata/interop/cpp/range_for.carbon +++ b/toolchain/check/testdata/interop/cpp/range_for.carbon @@ -1324,10 +1324,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.2(%self.param: ref %MaybeUnformed.515) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.2(%self.param: ref %MaybeUnformed.515) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.2(%self.param: ref %MaybeUnformed.515) = "no_op"; // CHECK:STDOUT: @@ -1377,10 +1374,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.6(%self.param: ref %Optional.0ac) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.6(%self.param: ref %Optional.0ac) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.6(%self.param: ref %Optional.0ac) = "no_op"; // CHECK:STDOUT: @@ -2147,10 +2141,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.2(%self.param: ref %MaybeUnformed.632) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.2(%self.param: ref %MaybeUnformed.632) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.2(%self.param: ref %MaybeUnformed.632) = "no_op"; // CHECK:STDOUT: @@ -2200,10 +2191,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.6(%self.param: ref %Optional.d06) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.6(%self.param: ref %Optional.d06) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.6(%self.param: ref %Optional.d06) = "no_op"; // CHECK:STDOUT: @@ -2881,10 +2869,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.2(%self.param: ref %MaybeUnformed.d16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.2(%self.param: ref %MaybeUnformed.d16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.2(%self.param: ref %MaybeUnformed.d16) = "no_op"; // CHECK:STDOUT: @@ -2934,10 +2919,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.6(%self.param: ref %Optional.cb9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.6(%self.param: ref %Optional.cb9) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.6(%self.param: ref %Optional.cb9) = "no_op"; // CHECK:STDOUT: @@ -3510,10 +3492,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.2(%self.param: ref %MaybeUnformed.8ff) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.2(%self.param: ref %MaybeUnformed.8ff) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.2(%self.param: ref %MaybeUnformed.8ff) = "no_op"; // CHECK:STDOUT: @@ -3563,10 +3542,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.6(%self.param: ref %Optional.049) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.6(%self.param: ref %Optional.049) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.6(%self.param: ref %Optional.049) = "no_op"; // CHECK:STDOUT: @@ -4139,10 +4115,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.2(%self.param: ref %MaybeUnformed.8ff) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.2(%self.param: ref %MaybeUnformed.8ff) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.2(%self.param: ref %MaybeUnformed.8ff) = "no_op"; // CHECK:STDOUT: @@ -4192,10 +4165,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.6(%self.param: ref %Optional.049) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.6(%self.param: ref %Optional.049) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.6(%self.param: ref %Optional.049) = "no_op"; // CHECK:STDOUT: @@ -4790,10 +4760,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.2(%self.param: ref %MaybeUnformed.e45) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.2(%self.param: ref %MaybeUnformed.e45) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.2(%self.param: ref %MaybeUnformed.e45) = "no_op"; // CHECK:STDOUT: @@ -4843,10 +4810,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.6(%self.param: ref %Optional.e69) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.6(%self.param: ref %Optional.e69) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.6(%self.param: ref %Optional.e69) = "no_op"; // CHECK:STDOUT: @@ -5350,10 +5314,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_44.2(%self.param: ref %MaybeUnformed.8ca) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_44.2(%self.param: ref %MaybeUnformed.8ca) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_44.2(%self.param: ref %MaybeUnformed.8ca) = "no_op"; // CHECK:STDOUT: @@ -5403,10 +5364,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_44.6(%self.param: ref %Optional.59e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_44.6(%self.param: ref %Optional.59e) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_44.6(%self.param: ref %Optional.59e) = "no_op"; // CHECK:STDOUT: @@ -5917,10 +5875,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc38_41.2(%self.param: ref %MaybeUnformed.0af) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc38_41.2(%self.param: ref %MaybeUnformed.0af) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc38_41.2(%self.param: ref %MaybeUnformed.0af) = "no_op"; // CHECK:STDOUT: @@ -5970,10 +5925,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc38_41.6(%self.param: ref %Optional.70f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc38_41.6(%self.param: ref %Optional.70f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc38_41.6(%self.param: ref %Optional.70f) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon index 251367ee55f9..7bdfe8ac06b7 100644 --- a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon +++ b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon @@ -495,10 +495,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/type_alias/import.carbon b/toolchain/check/testdata/interop/cpp/type_alias/import.carbon index 562b1e554b8a..68fce090df7c 100644 --- a/toolchain/check/testdata/interop/cpp/type_alias/import.carbon +++ b/toolchain/check/testdata/interop/cpp/type_alias/import.carbon @@ -242,10 +242,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/lifetime.carbon b/toolchain/check/testdata/let/lifetime.carbon index 4526f78bca77..fac179f99ab2 100644 --- a/toolchain/check/testdata/let/lifetime.carbon +++ b/toolchain/check/testdata/let/lifetime.carbon @@ -159,10 +159,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_37.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 19a10aed3b18..7197324bc489 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -334,10 +334,7 @@ fn Run() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_11.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_11.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_11.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index a8a9c400792d..da16aff36f1b 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -238,10 +238,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_5.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_5.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 63aaadaba06c..085405da4a1a 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -487,10 +487,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index bd36b2e24bda..ca119e3275ba 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -449,10 +449,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc56_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc56_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc56_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 85cfab5093ef..8585461c5e4c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -227,10 +227,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 32d028e9ef0a..8bc633e984d9 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -167,10 +167,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 75227929cf1e..50d5b021618e 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -250,10 +250,7 @@ fn TestRef(b: C) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 16ba1b5186f2..cc849e6205c5 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -452,10 +452,7 @@ fn Test() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_20.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_20.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 5005934c111b..089b129452c2 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -651,10 +651,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 4454fae00dbc..16817d754339 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -337,10 +337,7 @@ fn Main() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index c5f10059d812..ee127a353116 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -193,10 +193,7 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 25f2b3579189..f7a8d57e589b 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -476,10 +476,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 56f6f378cc33..a539e4f302f1 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -261,10 +261,7 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index 0a2530685a38..64443ceefb9a 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -238,10 +238,7 @@ fn G() -> C { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_12.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 3a1c0a0fda77..6b12bb81e24e 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -245,10 +245,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_14.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_14.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_14.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 17654b534d1e..4297c2cdfef3 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -181,10 +181,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_12.2(%self.param: ref %f64.dc1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_12.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_12.2(%self.param: ref %f64.dc1) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index d5c70191ee99..83f107fa5b74 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -1555,10 +1555,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_26.2(%self.param: ref %C.771) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_26.2(%self.param: ref %C.771) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_26.2(%self.param: ref %C.771) = "no_op"; // CHECK:STDOUT: @@ -1571,10 +1568,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.2 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %C.83b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %C.83b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %C.83b) = "no_op"; // CHECK:STDOUT: @@ -1587,10 +1581,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.3 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %C.5ce) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %C.5ce) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %C.5ce) = "no_op"; // CHECK:STDOUT: @@ -1603,10 +1594,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.4 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %C.b3e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %C.b3e) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C.b3e) = "no_op"; // CHECK:STDOUT: @@ -1619,10 +1607,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.5 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %C.8ee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %C.8ee) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %C.8ee) = "no_op"; // CHECK:STDOUT: @@ -1635,10 +1620,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.6 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12(%self.param: ref %C.5c1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12(%self.param: ref %C.5c1) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %C.5c1) = "no_op"; // CHECK:STDOUT: @@ -1651,10 +1633,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.7 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13(%self.param: ref %C.57b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13(%self.param: ref %C.57b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %C.57b) = "no_op"; // CHECK:STDOUT: @@ -1667,10 +1646,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.8 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14(%self.param: ref %C.b0a) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14(%self.param: ref %C.b0a) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14(%self.param: ref %C.b0a) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 3db3e6886f27..9260e047935d 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -262,10 +262,7 @@ fn G() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_12.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 8a249490a599..1dd67fc1bd71 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -247,10 +247,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_14.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index e53392395fc1..0a816386fcde 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -213,10 +213,7 @@ fn F() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_26.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_26.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_26.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index ed9d75b099bd..894aa7a6751c 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -216,10 +216,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon index ea30cc3a7908..9c18bed1d431 100644 --- a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon @@ -192,10 +192,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: @@ -449,10 +446,7 @@ fn H() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/destroy_control_flow.carbon b/toolchain/check/testdata/var/destroy_control_flow.carbon index 901d069b2eba..cb4beed8b6b3 100644 --- a/toolchain/check/testdata/var/destroy_control_flow.carbon +++ b/toolchain/check/testdata/var/destroy_control_flow.carbon @@ -253,10 +253,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: @@ -419,10 +416,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: @@ -561,10 +555,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: @@ -740,10 +731,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: @@ -919,10 +907,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/lifetime.carbon b/toolchain/check/testdata/var/lifetime.carbon index 94e4a88d4795..9858d28bae77 100644 --- a/toolchain/check/testdata/var/lifetime.carbon +++ b/toolchain/check/testdata/var/lifetime.carbon @@ -185,10 +185,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_25.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index cd8d1af83a17..0fb186b4d63e 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -1343,10 +1343,7 @@ fn Call() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_12.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_12.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_12.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: @@ -1480,10 +1477,7 @@ fn Call() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_12.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_12.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/while/lifetime.carbon b/toolchain/check/testdata/while/lifetime.carbon index ddc5117fc6f7..2c8fb2f292c7 100644 --- a/toolchain/check/testdata/while/lifetime.carbon +++ b/toolchain/check/testdata/while/lifetime.carbon @@ -129,10 +129,7 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_15.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon index 8ad2d7707094..0153ab83705a 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon @@ -50,9 +50,9 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !89 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !90 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !89 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !86 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !85 // CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,7 +68,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !31 // CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = shl i32 %Int.as.MulAssignWith.impl.Op.call, 1, !dbg !31 // CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !31 -// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !100 +// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !94 // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp samesign ult i32 %n.var.03, 65535, !dbg !27 // CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !26 // CHECK:STDOUT: @@ -88,22 +88,16 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !0, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -132,30 +126,26 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) // CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !2) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !49, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !54 = !{null, !2, !2} -// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) -// CHECK:STDOUT: !57 = !{!51} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !49, line: 331, type: !55, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !65) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !2) -// CHECK:STDOUT: !65 = !{!59, !60} -// CHECK:STDOUT: !83 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !84 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !88 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !90 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !98 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !99 = distinct !DILocation(line: 398, column: 5, scope: !50, inlinedAt: !98) -// CHECK:STDOUT: !100 = distinct !DILocation(line: 331, column: 3, scope: !58, inlinedAt: !99) +// CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !45, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !2) +// CHECK:STDOUT: !50 = !{null, !2, !2} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !53 = !{!47} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !45, line: 331, type: !51, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !2) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !2) +// CHECK:STDOUT: !61 = !{!55, !56} +// CHECK:STDOUT: !79 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !80 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !84 = distinct !DILocation(line: 9, column: 10, scope: !16) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !86 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 17, column: 5, scope: !21) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 398, column: 5, scope: !46, inlinedAt: !92) +// CHECK:STDOUT: !94 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !93) // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon index 3f346a3c18d8..95d76515572f 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon @@ -50,9 +50,9 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !89 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !90 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !89 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !86 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !85 // CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -68,7 +68,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !31 // CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = shl i32 %Int.as.MulAssignWith.impl.Op.call, 1, !dbg !31 // CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !31 -// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !100 +// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !94 // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp samesign ult i32 %n.var.03, 65535, !dbg !27 // CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !26 // CHECK:STDOUT: @@ -88,22 +88,16 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !0, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -132,30 +126,26 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) // CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !2) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !49, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !54 = !{null, !2, !2} -// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) -// CHECK:STDOUT: !57 = !{!51} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !49, line: 331, type: !55, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !65) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !2) -// CHECK:STDOUT: !65 = !{!59, !60} -// CHECK:STDOUT: !83 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !84 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !88 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !90 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !98 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !99 = distinct !DILocation(line: 398, column: 5, scope: !50, inlinedAt: !98) -// CHECK:STDOUT: !100 = distinct !DILocation(line: 331, column: 3, scope: !58, inlinedAt: !99) +// CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !45, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !2) +// CHECK:STDOUT: !50 = !{null, !2, !2} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !53 = !{!47} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !45, line: 331, type: !51, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !2) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !2) +// CHECK:STDOUT: !61 = !{!55, !56} +// CHECK:STDOUT: !79 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !80 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !84 = distinct !DILocation(line: 9, column: 10, scope: !16) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !86 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 17, column: 5, scope: !21) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 398, column: 5, scope: !46, inlinedAt: !92) +// CHECK:STDOUT: !94 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !93) // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon index 23a311e2652e..a5def709eb26 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon @@ -88,52 +88,45 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !50 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #0 !dbg !58 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !61 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !62 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !62 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #0 !dbg !54 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !57 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !58 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !58 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !66 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !71 -// CHECK:STDOUT: ret i32 %1, !dbg !73 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !62 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !67 +// CHECK:STDOUT: ret i32 %1, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !75 { -// CHECK:STDOUT: ret i32 %self, !dbg !81 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !71 { +// CHECK:STDOUT: ret i32 %self, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { noinline nounwind optnone } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !0, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -167,39 +160,35 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) // CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !2) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !49, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !53 = !DILocation(line: 398, column: 5, scope: !50) -// CHECK:STDOUT: !54 = !{null, !2, !2} -// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) -// CHECK:STDOUT: !56 = !DILocation(line: 396, column: 3, scope: !50) -// CHECK:STDOUT: !57 = !{!51} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !49, line: 331, type: !55, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !65) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !2) -// CHECK:STDOUT: !61 = !DILocation(line: 0, scope: !58) -// CHECK:STDOUT: !62 = !DILocation(line: 331, column: 3, scope: !58) -// CHECK:STDOUT: !63 = !{!2, !2} -// CHECK:STDOUT: !64 = !DISubroutineType(types: !63) -// CHECK:STDOUT: !65 = !{!59, !60} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !49, line: 64, type: !64, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !74) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !2) -// CHECK:STDOUT: !71 = !DILocation(line: 66, column: 17, scope: !66) -// CHECK:STDOUT: !73 = !DILocation(line: 66, column: 5, scope: !66) -// CHECK:STDOUT: !74 = !{!67} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !49, line: 59, type: !64, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !82) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !2) -// CHECK:STDOUT: !81 = !DILocation(line: 59, column: 28, scope: !75) -// CHECK:STDOUT: !82 = !{!76} -// CHECK:STDOUT: !83 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !84 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !45, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !2) +// CHECK:STDOUT: !49 = !DILocation(line: 398, column: 5, scope: !46) +// CHECK:STDOUT: !50 = !{null, !2, !2} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !52 = !DILocation(line: 396, column: 3, scope: !46) +// CHECK:STDOUT: !53 = !{!47} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !45, line: 331, type: !51, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !2) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !2) +// CHECK:STDOUT: !57 = !DILocation(line: 0, scope: !54) +// CHECK:STDOUT: !58 = !DILocation(line: 331, column: 3, scope: !54) +// CHECK:STDOUT: !59 = !{!2, !2} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !61 = !{!55, !56} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !45, line: 64, type: !60, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !70) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !2) +// CHECK:STDOUT: !67 = !DILocation(line: 66, column: 17, scope: !62) +// CHECK:STDOUT: !69 = !DILocation(line: 66, column: 5, scope: !62) +// CHECK:STDOUT: !70 = !{!63} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !45, line: 59, type: !60, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !78) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !2) +// CHECK:STDOUT: !77 = !DILocation(line: 59, column: 28, scope: !71) +// CHECK:STDOUT: !78 = !{!72} +// CHECK:STDOUT: !79 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !80 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon index 5da1338294e2..0be387452cde 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon @@ -87,45 +87,38 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !50 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline minsize nounwind optsize -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !58 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !61 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !62 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !62 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !54 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !57 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !58 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !58 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !66 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !71 -// CHECK:STDOUT: ret i32 %1, !dbg !73 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !62 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !67 +// CHECK:STDOUT: ret i32 %1, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !75 { -// CHECK:STDOUT: ret i32 %self, !dbg !81 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !71 { +// CHECK:STDOUT: ret i32 %self, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { minsize nounwind optsize } @@ -133,7 +126,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: attributes #2 = { alwaysinline minsize nounwind optsize } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !0, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -167,39 +160,35 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) // CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !2) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !49, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !53 = !DILocation(line: 398, column: 5, scope: !50) -// CHECK:STDOUT: !54 = !{null, !2, !2} -// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) -// CHECK:STDOUT: !56 = !DILocation(line: 396, column: 3, scope: !50) -// CHECK:STDOUT: !57 = !{!51} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !49, line: 331, type: !55, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !65) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !2) -// CHECK:STDOUT: !61 = !DILocation(line: 0, scope: !58) -// CHECK:STDOUT: !62 = !DILocation(line: 331, column: 3, scope: !58) -// CHECK:STDOUT: !63 = !{!2, !2} -// CHECK:STDOUT: !64 = !DISubroutineType(types: !63) -// CHECK:STDOUT: !65 = !{!59, !60} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !49, line: 64, type: !64, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !74) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !2) -// CHECK:STDOUT: !71 = !DILocation(line: 66, column: 17, scope: !66) -// CHECK:STDOUT: !73 = !DILocation(line: 66, column: 5, scope: !66) -// CHECK:STDOUT: !74 = !{!67} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !49, line: 59, type: !64, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !82) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !2) -// CHECK:STDOUT: !81 = !DILocation(line: 59, column: 28, scope: !75) -// CHECK:STDOUT: !82 = !{!76} -// CHECK:STDOUT: !83 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !84 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !45, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !2) +// CHECK:STDOUT: !49 = !DILocation(line: 398, column: 5, scope: !46) +// CHECK:STDOUT: !50 = !{null, !2, !2} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !52 = !DILocation(line: 396, column: 3, scope: !46) +// CHECK:STDOUT: !53 = !{!47} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !45, line: 331, type: !51, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !2) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !2) +// CHECK:STDOUT: !57 = !DILocation(line: 0, scope: !54) +// CHECK:STDOUT: !58 = !DILocation(line: 331, column: 3, scope: !54) +// CHECK:STDOUT: !59 = !{!2, !2} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !61 = !{!55, !56} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !45, line: 64, type: !60, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !70) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !2) +// CHECK:STDOUT: !67 = !DILocation(line: 66, column: 17, scope: !62) +// CHECK:STDOUT: !69 = !DILocation(line: 66, column: 5, scope: !62) +// CHECK:STDOUT: !70 = !{!63} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !45, line: 59, type: !60, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !78) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !2) +// CHECK:STDOUT: !77 = !DILocation(line: 59, column: 28, scope: !71) +// CHECK:STDOUT: !78 = !{!72} +// CHECK:STDOUT: !79 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !80 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon index caa07e86b47c..1547c9de99eb 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon @@ -50,9 +50,9 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !89 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !90 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !89 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !86 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !85 // CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -62,7 +62,7 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: br label %vector.body, !dbg !26 // CHECK:STDOUT: // CHECK:STDOUT: vector.body: ; preds = %vector.body, %entry -// CHECK:STDOUT: %index = phi i32 [ 0, %entry ], [ %index.next.1, %vector.body ], !dbg !100 +// CHECK:STDOUT: %index = phi i32 [ 0, %entry ], [ %index.next.1, %vector.body ], !dbg !94 // CHECK:STDOUT: %0 = zext nneg i32 %index to i64, !dbg !31 // CHECK:STDOUT: %1 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !31 // CHECK:STDOUT: %2 = getelementptr inbounds nuw i8, ptr %1, i64 16, !dbg !31 @@ -82,9 +82,9 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: %10 = shl <4 x i32> %wide.load4.1, splat (i32 1), !dbg !31 // CHECK:STDOUT: store <4 x i32> %9, ptr %7, align 4, !dbg !31 // CHECK:STDOUT: store <4 x i32> %10, ptr %8, align 4, !dbg !31 -// CHECK:STDOUT: %index.next.1 = add nuw nsw i32 %index, 16, !dbg !100 +// CHECK:STDOUT: %index.next.1 = add nuw nsw i32 %index, 16, !dbg !94 // CHECK:STDOUT: %11 = icmp eq i32 %index.next.1, 65536, !dbg !26 -// CHECK:STDOUT: br i1 %11, label %while.done, label %vector.body, !dbg !26, !llvm.loop !108 +// CHECK:STDOUT: br i1 %11, label %while.done, label %vector.body, !dbg !26, !llvm.loop !102 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %vector.body // CHECK:STDOUT: ret void, !dbg !35 @@ -104,22 +104,16 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nofree norecurse nosync nounwind memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !DIFile(filename: "foo.carbon", directory: "") // CHECK:STDOUT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !0, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -147,33 +141,29 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) // CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) // CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !2) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !49, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !54 = !{null, !2, !2} -// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) -// CHECK:STDOUT: !57 = !{!51} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !49, line: 331, type: !55, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !65) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !2) -// CHECK:STDOUT: !65 = !{!59, !60} -// CHECK:STDOUT: !83 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !84 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !88 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !90 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !88) -// CHECK:STDOUT: !98 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !99 = distinct !DILocation(line: 398, column: 5, scope: !50, inlinedAt: !98) -// CHECK:STDOUT: !100 = distinct !DILocation(line: 331, column: 3, scope: !58, inlinedAt: !99) -// CHECK:STDOUT: !105 = !{!"llvm.loop.isvectorized", i32 1} -// CHECK:STDOUT: !107 = !{!"llvm.loop.unroll.runtime.disable"} -// CHECK:STDOUT: !108 = distinct !{!108, !105, !107} +// CHECK:STDOUT: !45 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !45, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !2) +// CHECK:STDOUT: !50 = !{null, !2, !2} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !53 = !{!47} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !45, line: 331, type: !51, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !2) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 2, scope: !54, type: !2) +// CHECK:STDOUT: !61 = !{!55, !56} +// CHECK:STDOUT: !79 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !80 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !84 = distinct !DILocation(line: 9, column: 10, scope: !16) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !86 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !84) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 17, column: 5, scope: !21) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 398, column: 5, scope: !46, inlinedAt: !92) +// CHECK:STDOUT: !94 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !93) +// CHECK:STDOUT: !99 = !{!"llvm.loop.isvectorized", i32 1} +// CHECK:STDOUT: !101 = !{!"llvm.loop.unroll.runtime.disable"} +// CHECK:STDOUT: !102 = distinct !{!102, !99, !101} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index 342383a98c56..2408f00b2655 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -42,44 +42,37 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.133da171e935f2c5:core.Destroy.Core"(ptr %self) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core"(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -111,28 +104,24 @@ fn G() { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) // CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) // CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 16, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) // CHECK:STDOUT: !59 = !DILocation(line: 16, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.133da171e935f2c5:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !21) -// CHECK:STDOUT: !63 = !DILocation(line: 16, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index 6656b6fd1d75..3022f28d621b 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -59,44 +59,37 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -137,28 +130,24 @@ fn Run() { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 26, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 16, column: 26, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !21) // CHECK:STDOUT: !50 = !DILocation(line: 16, column: 26, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !21) // CHECK:STDOUT: !54 = !DILocation(line: 16, column: 26, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !21) -// CHECK:STDOUT: !58 = !DILocation(line: 16, column: 26, scope: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 16, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !21) // CHECK:STDOUT: !62 = !DILocation(line: 16, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !21) -// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index c202eb7ff982..f3a2530a697d 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -82,108 +82,94 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !69 // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !91 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c135263f75f7214d:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core"(ptr %self), !dbg !97 // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !109 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self), !dbg !109 // CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !111 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !111 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !113 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core"(ptr %self) #0 !dbg !115 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core"(ptr %self), !dbg !117 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self), !dbg !117 // CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !119 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !121 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d277540f487baeed:core.Destroy.Core"(ptr %self) #0 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core"(ptr %self), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !125 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -228,68 +214,60 @@ fn Run() { // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !34) // CHECK:STDOUT: !61 = !DILocation(line: 18, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !34) // CHECK:STDOUT: !65 = !DILocation(line: 18, column: 3, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !34) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !39) // CHECK:STDOUT: !69 = !DILocation(line: 18, column: 3, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) // CHECK:STDOUT: !73 = !DILocation(line: 18, column: 3, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !32, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) -// CHECK:STDOUT: !77 = !DILocation(line: 18, column: 3, scope: !75) +// CHECK:STDOUT: !77 = !DILocation(line: 17, column: 3, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) // CHECK:STDOUT: !81 = !DILocation(line: 17, column: 3, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !32, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) -// CHECK:STDOUT: !85 = !DILocation(line: 17, column: 3, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 16, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !39) // CHECK:STDOUT: !89 = !DILocation(line: 16, column: 3, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) // CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !39) // CHECK:STDOUT: !93 = !DILocation(line: 16, column: 3, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c135263f75f7214d:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !39) -// CHECK:STDOUT: !97 = !DILocation(line: 16, column: 3, scope: !95) +// CHECK:STDOUT: !97 = !DILocation(line: 15, column: 3, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !39) // CHECK:STDOUT: !101 = !DILocation(line: 15, column: 3, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) // CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) // CHECK:STDOUT: !105 = !DILocation(line: 15, column: 3, scope: !103) // CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !110) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !39) // CHECK:STDOUT: !109 = !DILocation(line: 15, column: 3, scope: !107) // CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !114) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !114) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !39) -// CHECK:STDOUT: !113 = !DILocation(line: 15, column: 3, scope: !111) +// CHECK:STDOUT: !113 = !DILocation(line: 14, column: 3, scope: !111) // CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8815565a27e3ec8c:core.Destroy.Core", scope: null, file: !32, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !118) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !118) // CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !39) -// CHECK:STDOUT: !117 = !DILocation(line: 15, column: 3, scope: !115) +// CHECK:STDOUT: !117 = !DILocation(line: 14, column: 3, scope: !115) // CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !122) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !39) -// CHECK:STDOUT: !121 = !DILocation(line: 14, column: 3, scope: !119) -// CHECK:STDOUT: !122 = !{!120} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d277540f487baeed:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !126) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !39) -// CHECK:STDOUT: !125 = !DILocation(line: 14, column: 3, scope: !123) -// CHECK:STDOUT: !126 = !{!124} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index d6a85a8438fe..0d250863b284 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -53,31 +53,24 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -115,20 +108,16 @@ fn G() -> i32 { // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) // CHECK:STDOUT: !49 = !DILocation(line: 18, column: 12, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20) // CHECK:STDOUT: !53 = !DILocation(line: 18, column: 12, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) // CHECK:STDOUT: !57 = !DILocation(line: 18, column: 12, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !21) // CHECK:STDOUT: !61 = !DILocation(line: 18, column: 12, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !21) -// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 12, scope: !63) -// CHECK:STDOUT: !66 = !{!64} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/iterate.carbon b/toolchain/lower/testdata/array/iterate.carbon index e33861c04486..00730b5d57c9 100644 --- a/toolchain/lower/testdata/array/iterate.carbon +++ b/toolchain/lower/testdata/array/iterate.carbon @@ -67,8 +67,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !31 { // CHECK:STDOUT: entry: @@ -89,183 +87,169 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self), !dbg !49 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !65 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !69 // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self), !dbg !77 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core"(ptr %self) #0 !dbg !83 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core"(ptr %self), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !85 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr %self) #0 !dbg !88 { -// CHECK:STDOUT: ret i32 0, !dbg !93 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: ret i32 0, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !95 { -// CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !103 -// CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !103 -// CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !104 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !87 { +// CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !95 +// CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !95 +// CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !96 // CHECK:STDOUT: // CHECK:STDOUT: 3: ; preds = %0 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !107 -// CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !110 -// CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !110 -// CHECK:STDOUT: %array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i32 %5, !dbg !108 -// CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !108 -// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %6), !dbg !111 -// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !99 +// CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !102 +// CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !102 +// CHECK:STDOUT: %array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i32 %5, !dbg !100 +// CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !100 +// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %6), !dbg !103 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: // CHECK:STDOUT: 7: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !115 -// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !121 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !127 -// CHECK:STDOUT: ret i1 %1, !dbg !128 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !119 +// CHECK:STDOUT: ret i1 %1, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !130 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !136 -// CHECK:STDOUT: ret i32 %1, !dbg !137 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !122 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !128 +// CHECK:STDOUT: ret i32 %1, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !140 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !143 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !132 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !135 +// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !140 { +// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !145 // CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !148 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !154 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !148 { +// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !151 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !156 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !159 -// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !153 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !158 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !158 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !158 +// CHECK:STDOUT: ret i1 %2, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !161 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !166 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !166 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !166 -// CHECK:STDOUT: ret i1 %2, !dbg !167 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !169 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !174 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !174 -// CHECK:STDOUT: ret i32 %1, !dbg !175 +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !161 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !166 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !166 +// CHECK:STDOUT: ret i32 %1, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !177 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !180 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !181 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !181 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !181 -// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !169 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !172 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !173 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !173 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !173 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !185 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !194 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !194 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !196 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !196 -// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !177 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !186 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !186 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !188 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !188 +// CHECK:STDOUT: ret void, !dbg !189 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !199 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !206 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !206 -// CHECK:STDOUT: ret void, !dbg !207 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !191 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !198 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !198 +// CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !208 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !213 -// CHECK:STDOUT: ret i32 %1, !dbg !215 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !200 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !205 +// CHECK:STDOUT: ret i32 %1, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !217 { -// CHECK:STDOUT: ret i32 %self, !dbg !223 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !209 { +// CHECK:STDOUT: ret i32 %self, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -315,133 +299,125 @@ fn F() { // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !11) // CHECK:STDOUT: !41 = !DILocation(line: 17, column: 7, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !6) // CHECK:STDOUT: !45 = !DILocation(line: 17, column: 7, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !6) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !11) // CHECK:STDOUT: !49 = !DILocation(line: 17, column: 7, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !11) // CHECK:STDOUT: !53 = !DILocation(line: 17, column: 7, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !11) // CHECK:STDOUT: !57 = !DILocation(line: 17, column: 7, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !11) // CHECK:STDOUT: !61 = !DILocation(line: 17, column: 7, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !11) // CHECK:STDOUT: !65 = !DILocation(line: 17, column: 7, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !11) // CHECK:STDOUT: !69 = !DILocation(line: 17, column: 7, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !11) -// CHECK:STDOUT: !73 = !DILocation(line: 17, column: 7, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 16, column: 26, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !11) -// CHECK:STDOUT: !77 = !DILocation(line: 17, column: 7, scope: !75) +// CHECK:STDOUT: !77 = !DILocation(line: 16, column: 26, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !11) -// CHECK:STDOUT: !81 = !DILocation(line: 16, column: 26, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1366a4d5330239bd:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !11) -// CHECK:STDOUT: !85 = !DILocation(line: 16, column: 26, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !87, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !94) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !11) -// CHECK:STDOUT: !93 = !DILocation(line: 23, column: 38, scope: !88) -// CHECK:STDOUT: !94 = !{!89} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !87, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !119) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !11) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 2, scope: !95, type: !11) -// CHECK:STDOUT: !103 = !DILocation(line: 25, column: 9, scope: !95) -// CHECK:STDOUT: !104 = !DILocation(line: 25, column: 8, scope: !95) -// CHECK:STDOUT: !107 = !DILocation(line: 26, column: 7, scope: !95) -// CHECK:STDOUT: !108 = !DILocation(line: 27, column: 31, scope: !95) -// CHECK:STDOUT: !110 = !DILocation(line: 27, column: 36, scope: !95) -// CHECK:STDOUT: !111 = !DILocation(line: 27, column: 14, scope: !95) -// CHECK:STDOUT: !112 = !{!11, !6} -// CHECK:STDOUT: !113 = !DISubroutineType(types: !112) -// CHECK:STDOUT: !114 = !DILocation(line: 27, column: 7, scope: !95) -// CHECK:STDOUT: !115 = !DILocation(line: 29, column: 14, scope: !95) -// CHECK:STDOUT: !116 = !{!11} -// CHECK:STDOUT: !117 = !DISubroutineType(types: !116) -// CHECK:STDOUT: !118 = !DILocation(line: 29, column: 7, scope: !95) -// CHECK:STDOUT: !119 = !{!96, !97} -// CHECK:STDOUT: !120 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !120, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !11) -// CHECK:STDOUT: !127 = !DILocation(line: 37, column: 12, scope: !121) -// CHECK:STDOUT: !128 = !DILocation(line: 37, column: 5, scope: !121) -// CHECK:STDOUT: !129 = !{!122} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !120, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !138) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !11) -// CHECK:STDOUT: !136 = !DILocation(line: 40, column: 12, scope: !130) -// CHECK:STDOUT: !137 = !DILocation(line: 40, column: 5, scope: !130) -// CHECK:STDOUT: !138 = !{!131} -// CHECK:STDOUT: !139 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !139, line: 396, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) +// CHECK:STDOUT: !79 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !79, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !11) +// CHECK:STDOUT: !85 = !DILocation(line: 23, column: 38, scope: !80) +// CHECK:STDOUT: !86 = !{!81} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.e163a239f9fa927c:Iterate.Core.64c6854216281bef", scope: null, file: !79, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !11) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 2, scope: !87, type: !11) +// CHECK:STDOUT: !95 = !DILocation(line: 25, column: 9, scope: !87) +// CHECK:STDOUT: !96 = !DILocation(line: 25, column: 8, scope: !87) +// CHECK:STDOUT: !99 = !DILocation(line: 26, column: 7, scope: !87) +// CHECK:STDOUT: !100 = !DILocation(line: 27, column: 31, scope: !87) +// CHECK:STDOUT: !102 = !DILocation(line: 27, column: 36, scope: !87) +// CHECK:STDOUT: !103 = !DILocation(line: 27, column: 14, scope: !87) +// CHECK:STDOUT: !104 = !{!11, !6} +// CHECK:STDOUT: !105 = !DISubroutineType(types: !104) +// CHECK:STDOUT: !106 = !DILocation(line: 27, column: 7, scope: !87) +// CHECK:STDOUT: !107 = !DILocation(line: 29, column: 14, scope: !87) +// CHECK:STDOUT: !108 = !{!11} +// CHECK:STDOUT: !109 = !DISubroutineType(types: !108) +// CHECK:STDOUT: !110 = !DILocation(line: 29, column: 7, scope: !87) +// CHECK:STDOUT: !111 = !{!88, !89} +// CHECK:STDOUT: !112 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !112, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !121) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !11) +// CHECK:STDOUT: !119 = !DILocation(line: 37, column: 12, scope: !113) +// CHECK:STDOUT: !120 = !DILocation(line: 37, column: 5, scope: !113) +// CHECK:STDOUT: !121 = !{!114} +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !112, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !130) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !11) +// CHECK:STDOUT: !128 = !DILocation(line: 40, column: 12, scope: !122) +// CHECK:STDOUT: !129 = !DILocation(line: 40, column: 5, scope: !122) +// CHECK:STDOUT: !130 = !{!123} +// CHECK:STDOUT: !131 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !131, line: 396, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !6) +// CHECK:STDOUT: !135 = !DILocation(line: 398, column: 5, scope: !132) +// CHECK:STDOUT: !136 = !{null, !6, !6} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !138 = !DILocation(line: 396, column: 3, scope: !132) +// CHECK:STDOUT: !139 = !{!133} +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !112, line: 33, type: !105, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) // CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !6) -// CHECK:STDOUT: !143 = !DILocation(line: 398, column: 5, scope: !140) -// CHECK:STDOUT: !144 = !{null, !6, !6} -// CHECK:STDOUT: !145 = !DISubroutineType(types: !144) -// CHECK:STDOUT: !146 = !DILocation(line: 396, column: 3, scope: !140) +// CHECK:STDOUT: !145 = !DILocation(line: 34, column: 12, scope: !140) +// CHECK:STDOUT: !146 = !DILocation(line: 34, column: 5, scope: !140) // CHECK:STDOUT: !147 = !{!141} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !120, line: 33, type: !113, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !6) -// CHECK:STDOUT: !153 = !DILocation(line: 34, column: 12, scope: !148) -// CHECK:STDOUT: !154 = !DILocation(line: 34, column: 5, scope: !148) -// CHECK:STDOUT: !155 = !{!149} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !120, line: 30, type: !117, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !159 = !DILocation(line: 31, column: 12, scope: !156) -// CHECK:STDOUT: !160 = !DILocation(line: 31, column: 5, scope: !156) -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !120, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !168) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !112, line: 30, type: !109, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !151 = !DILocation(line: 31, column: 12, scope: !148) +// CHECK:STDOUT: !152 = !DILocation(line: 31, column: 5, scope: !148) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !112, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !160) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !11) +// CHECK:STDOUT: !158 = !DILocation(line: 142, column: 12, scope: !153) +// CHECK:STDOUT: !159 = !DILocation(line: 142, column: 5, scope: !153) +// CHECK:STDOUT: !160 = !{!154} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !112, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !168) // CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !11) -// CHECK:STDOUT: !166 = !DILocation(line: 142, column: 12, scope: !161) -// CHECK:STDOUT: !167 = !DILocation(line: 142, column: 5, scope: !161) +// CHECK:STDOUT: !166 = !DILocation(line: 145, column: 12, scope: !161) +// CHECK:STDOUT: !167 = !DILocation(line: 145, column: 5, scope: !161) // CHECK:STDOUT: !168 = !{!162} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !120, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !176) -// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !11) -// CHECK:STDOUT: !174 = !DILocation(line: 145, column: 12, scope: !169) -// CHECK:STDOUT: !175 = !DILocation(line: 145, column: 5, scope: !169) -// CHECK:STDOUT: !176 = !{!170} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !139, line: 331, type: !145, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !184) +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !131, line: 331, type: !137, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !176) +// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !6) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 2, scope: !169, type: !6) +// CHECK:STDOUT: !172 = !DILocation(line: 0, scope: !169) +// CHECK:STDOUT: !173 = !DILocation(line: 331, column: 3, scope: !169) +// CHECK:STDOUT: !174 = !{!6, !6} +// CHECK:STDOUT: !175 = !DISubroutineType(types: !174) +// CHECK:STDOUT: !176 = !{!170, !171} +// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !112, line: 131, type: !105, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190) // CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !6) -// CHECK:STDOUT: !179 = !DILocalVariable(arg: 2, scope: !177, type: !6) -// CHECK:STDOUT: !180 = !DILocation(line: 0, scope: !177) -// CHECK:STDOUT: !181 = !DILocation(line: 331, column: 3, scope: !177) -// CHECK:STDOUT: !182 = !{!6, !6} -// CHECK:STDOUT: !183 = !DISubroutineType(types: !182) -// CHECK:STDOUT: !184 = !{!178, !179} -// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !120, line: 131, type: !113, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !198) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !6) -// CHECK:STDOUT: !194 = !DILocation(line: 137, column: 5, scope: !185) -// CHECK:STDOUT: !196 = !DILocation(line: 138, column: 5, scope: !185) -// CHECK:STDOUT: !197 = !DILocation(line: 139, column: 5, scope: !185) -// CHECK:STDOUT: !198 = !{!186} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !120, line: 125, type: !117, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !206 = !DILocation(line: 128, column: 5, scope: !199) -// CHECK:STDOUT: !207 = !DILocation(line: 129, column: 5, scope: !199) -// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !139, line: 64, type: !183, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !216) -// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !6) -// CHECK:STDOUT: !213 = !DILocation(line: 66, column: 17, scope: !208) -// CHECK:STDOUT: !215 = !DILocation(line: 66, column: 5, scope: !208) -// CHECK:STDOUT: !216 = !{!209} -// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !139, line: 59, type: !183, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !224) -// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !6) -// CHECK:STDOUT: !223 = !DILocation(line: 59, column: 28, scope: !217) -// CHECK:STDOUT: !224 = !{!218} +// CHECK:STDOUT: !186 = !DILocation(line: 137, column: 5, scope: !177) +// CHECK:STDOUT: !188 = !DILocation(line: 138, column: 5, scope: !177) +// CHECK:STDOUT: !189 = !DILocation(line: 139, column: 5, scope: !177) +// CHECK:STDOUT: !190 = !{!178} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !112, line: 125, type: !109, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !198 = !DILocation(line: 128, column: 5, scope: !191) +// CHECK:STDOUT: !199 = !DILocation(line: 129, column: 5, scope: !191) +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !131, line: 64, type: !175, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !208) +// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !6) +// CHECK:STDOUT: !205 = !DILocation(line: 66, column: 17, scope: !200) +// CHECK:STDOUT: !207 = !DILocation(line: 66, column: 5, scope: !200) +// CHECK:STDOUT: !208 = !{!201} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !131, line: 59, type: !175, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !216) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) +// CHECK:STDOUT: !215 = !DILocation(line: 59, column: 28, scope: !209) +// CHECK:STDOUT: !216 = !{!210} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/layout.carbon b/toolchain/lower/testdata/array/layout.carbon index cd718b9a874d..a0b1c923d5d1 100644 --- a/toolchain/lower/testdata/array/layout.carbon +++ b/toolchain/lower/testdata/array/layout.carbon @@ -67,44 +67,37 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core"(ptr %self), !dbg !63 // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e05708f03266b13:core.Destroy.Core"(ptr %self) #0 !dbg !69 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core"(ptr %self), !dbg !71 -// CHECK:STDOUT: ret void, !dbg !71 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -143,30 +136,26 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) // CHECK:STDOUT: !47 = !DILocation(line: 9, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) // CHECK:STDOUT: !51 = !DILocation(line: 9, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !20) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 9, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) // CHECK:STDOUT: !59 = !DILocation(line: 9, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bcbe81284b6bcb5:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !21) // CHECK:STDOUT: !63 = !DILocation(line: 9, column: 3, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !21) // CHECK:STDOUT: !67 = !DILocation(line: 9, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e05708f03266b13:core.Destroy.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !21) -// CHECK:STDOUT: !71 = !DILocation(line: 9, column: 3, scope: !69) -// CHECK:STDOUT: !72 = !{!70} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'constant_with_padding.carbon' @@ -177,10 +166,10 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !76 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 32 @_Cc.Main, ptr align 32 @array.loc3_1, i64 320, i1 false), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 32 @_Cc.Main, ptr align 32 @array.loc3_1, i64 320, i1 false), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -189,16 +178,16 @@ 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.dbg.cu = !{!74} +// CHECK:STDOUT: !llvm.dbg.cu = !{!70} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !73 = !DIFile(filename: "constant_with_padding.carbon", directory: "") -// CHECK:STDOUT: !74 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !73, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !73, type: !25, spFlags: DISPFlagDefinition, unit: !74) -// CHECK:STDOUT: !78 = !DILocation(line: 3, column: 1, scope: !76) -// CHECK:STDOUT: !79 = !DILocation(line: 0, scope: !76) +// CHECK:STDOUT: !69 = !DIFile(filename: "constant_with_padding.carbon", directory: "") +// CHECK:STDOUT: !70 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !69, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !69, type: !25, spFlags: DISPFlagDefinition, unit: !70) +// CHECK:STDOUT: !74 = !DILocation(line: 3, column: 1, scope: !72) +// CHECK:STDOUT: !75 = !DILocation(line: 0, scope: !72) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/char.carbon b/toolchain/lower/testdata/builtins/char.carbon index 42381d7c199c..cdba3b2d5012 100644 --- a/toolchain/lower/testdata/builtins/char.carbon +++ b/toolchain/lower/testdata/builtins/char.carbon @@ -41,31 +41,17 @@ fn Example() -> char { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !22 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !22 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !24 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !26 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8839c9ace2be9137:core.Destroy.Core"(ptr %self) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self), !dbg !28 // CHECK:STDOUT: ret void, !dbg !28 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8839c9ace2be9137:core.Destroy.Core"(ptr %self) #0 !dbg !30 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !32 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8839c9ace2be9137:core.Destroy.Core"(ptr %self) #0 !dbg !34 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8839c9ace2be9137:core.Destroy.Core"(ptr %self), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !36 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -92,20 +78,12 @@ fn Example() -> char { // CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !18, type: !6) // CHECK:STDOUT: !20 = !DILocation(line: 5, column: 3, scope: !18) // CHECK:STDOUT: !21 = !{!19} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !22, type: !6) // CHECK:STDOUT: !24 = !DILocation(line: 5, column: 3, scope: !22) // CHECK:STDOUT: !25 = !{!23} -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8839c9ace2be9137:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !6) // CHECK:STDOUT: !28 = !DILocation(line: 5, column: 3, scope: !26) // CHECK:STDOUT: !29 = !{!27} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8839c9ace2be9137:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !6) -// CHECK:STDOUT: !32 = !DILocation(line: 5, column: 3, scope: !30) -// CHECK:STDOUT: !33 = !{!31} -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8839c9ace2be9137:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) -// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !6) -// CHECK:STDOUT: !36 = !DILocation(line: 5, column: 3, scope: !34) -// CHECK:STDOUT: !37 = !{!35} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/cpp.carbon b/toolchain/lower/testdata/builtins/cpp.carbon index 99f827ec26a9..fb5717955ca7 100644 --- a/toolchain/lower/testdata/builtins/cpp.carbon +++ b/toolchain/lower/testdata/builtins/cpp.carbon @@ -107,37 +107,30 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !46 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core"(ptr %self) #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !54 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -149,8 +142,8 @@ fn Test() { // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!56, !57, !58, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!63} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!59} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -185,32 +178,28 @@ fn Test() { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !6) // CHECK:STDOUT: !34 = !DILocation(line: 25, column: 41, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 25, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 25, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !6) // CHECK:STDOUT: !38 = !DILocation(line: 25, column: 41, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 25, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !6) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !8) // CHECK:STDOUT: !42 = !DILocation(line: 25, column: 41, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !8) // CHECK:STDOUT: !46 = !DILocation(line: 25, column: 41, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core", scope: null, file: !4, line: 26, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !8) -// CHECK:STDOUT: !50 = !DILocation(line: 25, column: 41, scope: !48) +// CHECK:STDOUT: !50 = !DILocation(line: 26, column: 19, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core", scope: null, file: !4, line: 26, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !8) -// CHECK:STDOUT: !54 = !DILocation(line: 26, column: 19, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !57 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !59 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !60 = !{!"omnipotent char", !59, i64 0} -// CHECK:STDOUT: !61 = !{!"int", !60, i64 0} -// CHECK:STDOUT: !62 = !{!"__libc_errno", !61, i64 0} -// CHECK:STDOUT: !63 = !{!62, !61, i64 0} +// CHECK:STDOUT: !52 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !55 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !56 = !{!"omnipotent char", !55, i64 0} +// CHECK:STDOUT: !57 = !{!"int", !56, i64 0} +// CHECK:STDOUT: !58 = !{!"__libc_errno", !57, i64 0} +// CHECK:STDOUT: !59 = !{!58, !57, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/maybe_unformed.carbon b/toolchain/lower/testdata/builtins/maybe_unformed.carbon index 99a08d01ec63..640aaf8c6458 100644 --- a/toolchain/lower/testdata/builtins/maybe_unformed.carbon +++ b/toolchain/lower/testdata/builtins/maybe_unformed.carbon @@ -148,74 +148,53 @@ fn PassAdapterBool() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !103 // CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !107 // CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !109 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !111 // CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4615e23332cd8b4c:core.Destroy.Core"(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: define void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !113 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !115 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core"(ptr %self) #0 !dbg !117 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4615e23332cd8b4c:core.Destroy.Core"(ptr %self), !dbg !119 -// CHECK:STDOUT: ret void, !dbg !119 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !121 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !124 +// CHECK:STDOUT: ret void, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMakeAdapterBool.Main(ptr sret(i1)) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassAdapterBool.Main() #0 !dbg !126 { +// CHECK:STDOUT: define void @_CPassAdapterBool.Main() #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !127 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !127 -// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !127 -// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !128 -// CHECK:STDOUT: call void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %.loc55_35.1.temp), !dbg !127 -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !119 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !119 +// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !119 +// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !120 +// CHECK:STDOUT: call void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %.loc55_35.1.temp), !dbg !119 +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self) #0 !dbg !130 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self) #0 !dbg !122 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !132 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self) #0 !dbg !134 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c9abcd82dd2173d7:core.Destroy.Core"(ptr %self), !dbg !136 -// CHECK:STDOUT: ret void, !dbg !136 +// CHECK:STDOUT: ret void, !dbg !124 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -287,44 +266,32 @@ fn PassAdapterBool() { // CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !34) // CHECK:STDOUT: !95 = !DILocation(line: 48, column: 18, scope: !93) // CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) // CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !34) // CHECK:STDOUT: !99 = !DILocation(line: 48, column: 18, scope: !97) // CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !34) +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !104) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) // CHECK:STDOUT: !103 = !DILocation(line: 48, column: 18, scope: !101) // CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !108) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !108) // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !37) // CHECK:STDOUT: !107 = !DILocation(line: 48, column: 18, scope: !105) // CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !37) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !34) // CHECK:STDOUT: !111 = !DILocation(line: 48, column: 18, scope: !109) // CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4615e23332cd8b4c:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !116) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !34) -// CHECK:STDOUT: !115 = !DILocation(line: 48, column: 18, scope: !113) -// CHECK:STDOUT: !116 = !{!114} -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4615e23332cd8b4c:core.Destroy.Core", scope: null, file: !32, line: 48, type: !36, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !120) -// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !34) -// CHECK:STDOUT: !119 = !DILocation(line: 48, column: 18, scope: !117) -// CHECK:STDOUT: !120 = !{!118} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !32, line: 51, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !125) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !37) -// CHECK:STDOUT: !124 = !DILocation(line: 51, column: 1, scope: !121) -// CHECK:STDOUT: !125 = !{!122} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !32, line: 54, type: !43, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !127 = !DILocation(line: 55, column: 19, scope: !126) -// CHECK:STDOUT: !128 = !DILocation(line: 55, column: 3, scope: !126) -// CHECK:STDOUT: !129 = !DILocation(line: 54, column: 1, scope: !126) -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c9abcd82dd2173d7:core.Destroy.Core", scope: null, file: !32, line: 55, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !37) -// CHECK:STDOUT: !132 = !DILocation(line: 55, column: 19, scope: !130) -// CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core", scope: null, file: !32, line: 55, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !137) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !37) -// CHECK:STDOUT: !136 = !DILocation(line: 55, column: 19, scope: !134) -// CHECK:STDOUT: !137 = !{!135} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !32, line: 51, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !117) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !37) +// CHECK:STDOUT: !116 = !DILocation(line: 51, column: 1, scope: !113) +// CHECK:STDOUT: !117 = !{!114} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !32, line: 54, type: !43, spFlags: DISPFlagDefinition, unit: !33) +// CHECK:STDOUT: !119 = !DILocation(line: 55, column: 19, scope: !118) +// CHECK:STDOUT: !120 = !DILocation(line: 55, column: 3, scope: !118) +// CHECK:STDOUT: !121 = !DILocation(line: 54, column: 1, scope: !118) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9abcd82dd2173d7:core.Destroy.Core", scope: null, file: !32, line: 55, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !125) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !37) +// CHECK:STDOUT: !124 = !DILocation(line: 55, column: 19, scope: !122) +// CHECK:STDOUT: !125 = !{!123} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index a29ffc1bc546..b7ad5f70b32a 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -105,57 +105,43 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !71 // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !75 // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !79 // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core"(ptr %self), !dbg !83 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.865f2ef613cc5c67:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core"(ptr %self), !dbg !87 // CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.865f2ef613cc5c67:core.Destroy.Core"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !91 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.865f2ef613cc5c67:core.Destroy.Core"(ptr %self) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.865f2ef613cc5c67:core.Destroy.Core"(ptr %self), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !95 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -204,75 +190,67 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !20) // CHECK:STDOUT: !63 = !DILocation(line: 27, column: 3, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20) // CHECK:STDOUT: !67 = !DILocation(line: 27, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !20) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !21) // CHECK:STDOUT: !71 = !DILocation(line: 27, column: 3, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !76) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !76) // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !21) // CHECK:STDOUT: !75 = !DILocation(line: 27, column: 3, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !80) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !80) // CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !21) // CHECK:STDOUT: !79 = !DILocation(line: 27, column: 3, scope: !77) // CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a031f5a2c623d311:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !84) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a031f5a2c623d311:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !84) // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !21) // CHECK:STDOUT: !83 = !DILocation(line: 27, column: 3, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a031f5a2c623d311:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.865f2ef613cc5c67:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !21) // CHECK:STDOUT: !87 = !DILocation(line: 27, column: 3, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.865f2ef613cc5c67:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !21) -// CHECK:STDOUT: !91 = !DILocation(line: 27, column: 3, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.865f2ef613cc5c67:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !21) -// CHECK:STDOUT: !95 = !DILocation(line: 27, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'adapt_int.carbon' // CHECK:STDOUT: source_filename = "adapt_int.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_COp.Int.Main:Copy.Core"(i32 %self) #0 !dbg !101 { +// CHECK:STDOUT: define i32 @"_COp.Int.Main:Copy.Core"(i32 %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %self, !dbg !108 +// CHECK:STDOUT: ret i32 %self, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CDoStuff.Main(i32 %a) #0 !dbg !110 { +// CHECK:STDOUT: define i32 @_CDoStuff.Main(i32 %a) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call = call i32 @"_COp.Int.Main:Copy.Core"(i32 %a), !dbg !115 -// CHECK:STDOUT: ret i32 %Int.as.Copy.impl.Op.call, !dbg !116 +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call = call i32 @"_COp.Int.Main:Copy.Core"(i32 %a), !dbg !107 +// CHECK:STDOUT: ret i32 %Int.as.Copy.impl.Op.call, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!98} +// CHECK:STDOUT: !llvm.dbg.cu = !{!90} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !97 = !DIFile(filename: "adapt_int.carbon", directory: "") -// CHECK:STDOUT: !98 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !97, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !99 = !{!20, !20} -// CHECK:STDOUT: !100 = !DISubroutineType(types: !99) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !97, line: 8, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !109) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !20) -// CHECK:STDOUT: !108 = !DILocation(line: 8, column: 27, scope: !101) -// CHECK:STDOUT: !109 = !{!102} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !97, line: 12, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !117) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !20) -// CHECK:STDOUT: !115 = !DILocation(line: 13, column: 10, scope: !110) -// CHECK:STDOUT: !116 = !DILocation(line: 13, column: 3, scope: !110) -// CHECK:STDOUT: !117 = !{!111} +// CHECK:STDOUT: !89 = !DIFile(filename: "adapt_int.carbon", directory: "") +// CHECK:STDOUT: !90 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !89, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !91 = !{!20, !20} +// CHECK:STDOUT: !92 = !DISubroutineType(types: !91) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !89, line: 8, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !101) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !20) +// CHECK:STDOUT: !100 = !DILocation(line: 8, column: 27, scope: !93) +// CHECK:STDOUT: !101 = !{!94} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !89, line: 12, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !109) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !20) +// CHECK:STDOUT: !107 = !DILocation(line: 13, column: 10, scope: !102) +// CHECK:STDOUT: !108 = !DILocation(line: 13, column: 3, scope: !102) +// CHECK:STDOUT: !109 = !{!103} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/basic.carbon b/toolchain/lower/testdata/class/basic.carbon index ffcc77d3d6ad..235e4bdab641 100644 --- a/toolchain/lower/testdata/class/basic.carbon +++ b/toolchain/lower/testdata/class/basic.carbon @@ -48,50 +48,43 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !48 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self), !dbg !56 // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self), !dbg !60 // CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !64 // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !66 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !68 -// CHECK:STDOUT: ret void, !dbg !68 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -126,32 +119,28 @@ fn Run() { // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 22, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 22, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !21) // CHECK:STDOUT: !48 = !DILocation(line: 22, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !21) // CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !21) // CHECK:STDOUT: !56 = !DILocation(line: 22, column: 3, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !21) // CHECK:STDOUT: !60 = !DILocation(line: 22, column: 3, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) // CHECK:STDOUT: !64 = !DILocation(line: 22, column: 3, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !21) -// CHECK:STDOUT: !68 = !DILocation(line: 22, column: 3, scope: !66) -// CHECK:STDOUT: !69 = !{!67} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/convert.carbon b/toolchain/lower/testdata/class/convert.carbon index 19ca9f8b2171..8d9f959939b4 100644 --- a/toolchain/lower/testdata/class/convert.carbon +++ b/toolchain/lower/testdata/class/convert.carbon @@ -78,44 +78,37 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !60 // CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self), !dbg !64 // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core"(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core"(ptr %self), !dbg !72 // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !74 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core"(ptr %self), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !76 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -161,56 +154,52 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) // CHECK:STDOUT: !52 = !DILocation(line: 14, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) // CHECK:STDOUT: !56 = !DILocation(line: 14, column: 3, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !21) // CHECK:STDOUT: !60 = !DILocation(line: 14, column: 3, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9edb2ca1f7e7a271:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9edb2ca1f7e7a271:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) // CHECK:STDOUT: !64 = !DILocation(line: 14, column: 3, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9edb2ca1f7e7a271:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !21) // CHECK:STDOUT: !68 = !DILocation(line: 14, column: 3, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.aecc0ff76a42614a:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !21) // CHECK:STDOUT: !72 = !DILocation(line: 14, column: 3, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !77) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !21) -// CHECK:STDOUT: !76 = !DILocation(line: 14, column: 3, scope: !74) -// CHECK:STDOUT: !77 = !{!75} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'partial_class_to_partial_base.carbon' // CHECK:STDOUT: source_filename = "partial_class_to_partial_base.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CF.Main(ptr %d) #0 !dbg !82 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %d) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_13.1.base = getelementptr inbounds nuw { {} }, ptr %d, i32 0, i32 0, !dbg !88 -// CHECK:STDOUT: ret ptr %.loc7_13.1.base, !dbg !88 +// CHECK:STDOUT: %.loc7_13.1.base = getelementptr inbounds nuw { {} }, ptr %d, i32 0, i32 0, !dbg !84 +// CHECK:STDOUT: ret ptr %.loc7_13.1.base, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!75} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !78 = !DIFile(filename: "partial_class_to_partial_base.carbon", directory: "") -// CHECK:STDOUT: !79 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !78, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !80 = !{!21, !21} -// CHECK:STDOUT: !81 = !DISubroutineType(types: !80) -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !78, line: 6, type: !81, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !89) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !21) -// CHECK:STDOUT: !88 = !DILocation(line: 7, column: 5, scope: !82) -// CHECK:STDOUT: !89 = !{!83} +// CHECK:STDOUT: !74 = !DIFile(filename: "partial_class_to_partial_base.carbon", directory: "") +// CHECK:STDOUT: !75 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !74, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !76 = !{!21, !21} +// CHECK:STDOUT: !77 = !DISubroutineType(types: !76) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !74, line: 6, type: !77, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !85) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !21) +// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 5, scope: !78) +// CHECK:STDOUT: !85 = !{!79} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/field.carbon b/toolchain/lower/testdata/class/field.carbon index d0fac7ea1696..3a3b474d7318 100644 --- a/toolchain/lower/testdata/class/field.carbon +++ b/toolchain/lower/testdata/class/field.carbon @@ -103,50 +103,43 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self), !dbg !70 // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core"(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !78 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !80 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !82 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -186,34 +179,30 @@ fn Run() { // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) // CHECK:STDOUT: !54 = !DILocation(line: 14, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !20) // CHECK:STDOUT: !58 = !DILocation(line: 14, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !20) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !21) // CHECK:STDOUT: !62 = !DILocation(line: 14, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !21) // CHECK:STDOUT: !66 = !DILocation(line: 14, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !21) // CHECK:STDOUT: !70 = !DILocation(line: 14, column: 3, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09861f44a9b84abf:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !21) // CHECK:STDOUT: !74 = !DILocation(line: 14, column: 3, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !21) // CHECK:STDOUT: !78 = !DILocation(line: 14, column: 3, scope: !76) // CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !21) -// CHECK:STDOUT: !82 = !DILocation(line: 14, column: 3, scope: !80) -// CHECK:STDOUT: !83 = !{!81} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'inplace_init_with_nonconst.carbon' @@ -222,72 +211,65 @@ fn Run() { // CHECK:STDOUT: @Other.val.loc15_33.5 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !86 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %o.var = alloca {}, align 1, !dbg !87 -// CHECK:STDOUT: %_.var = alloca { ptr, {} }, align 8, !dbg !89 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !87 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !89 -// CHECK:STDOUT: %.loc15_33.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 0, !dbg !92 -// CHECK:STDOUT: store ptr %o.var, ptr %.loc15_33.2.a, align 8, !dbg !92 -// CHECK:STDOUT: %.loc15_33.4.b = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 1, !dbg !92 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.loc15_33.4.b, ptr align 1 @Other.val.loc15_33.5, i64 0, i1 false), !dbg !92 -// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !89 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !87 -// CHECK:STDOUT: ret i32 0, !dbg !94 +// CHECK:STDOUT: %o.var = alloca {}, align 1, !dbg !83 +// CHECK:STDOUT: %_.var = alloca { ptr, {} }, align 8, !dbg !85 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !85 +// CHECK:STDOUT: %.loc15_33.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 0, !dbg !88 +// CHECK:STDOUT: store ptr %o.var, ptr %.loc15_33.2.a, align 8, !dbg !88 +// CHECK:STDOUT: %.loc15_33.4.b = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 1, !dbg !88 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.loc15_33.4.b, ptr align 1 @Other.val.loc15_33.5, i64 0, i1 false), !dbg !88 +// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !85 +// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !83 +// CHECK:STDOUT: ret i32 0, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self), !dbg !109 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self), !dbg !109 // CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !111 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !111 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !113 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !115 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self), !dbg !117 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !117 // CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !119 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !121 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !125 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -300,7 +282,7 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!85} +// CHECK:STDOUT: !llvm.dbg.cu = !{!81} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -311,45 +293,41 @@ fn Run() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !28 = !{null, !21} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !84 = !DIFile(filename: "inplace_init_with_nonconst.carbon", directory: "") -// CHECK:STDOUT: !85 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !84, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !84, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !85) -// CHECK:STDOUT: !87 = !DILocation(line: 12, column: 3, scope: !86) -// CHECK:STDOUT: !89 = !DILocation(line: 15, column: 3, scope: !86) -// CHECK:STDOUT: !92 = !DILocation(line: 15, column: 16, scope: !86) -// CHECK:STDOUT: !94 = !DILocation(line: 11, column: 1, scope: !86) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !98) +// CHECK:STDOUT: !80 = !DIFile(filename: "inplace_init_with_nonconst.carbon", directory: "") +// CHECK:STDOUT: !81 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !80, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !80, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !83 = !DILocation(line: 12, column: 3, scope: !82) +// CHECK:STDOUT: !85 = !DILocation(line: 15, column: 3, scope: !82) +// CHECK:STDOUT: !88 = !DILocation(line: 15, column: 16, scope: !82) +// CHECK:STDOUT: !90 = !DILocation(line: 11, column: 1, scope: !82) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !94) +// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !21) +// CHECK:STDOUT: !93 = !DILocation(line: 15, column: 3, scope: !91) +// CHECK:STDOUT: !94 = !{!92} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !98) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !21) // CHECK:STDOUT: !97 = !DILocation(line: 15, column: 3, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !102) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !102) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !21) // CHECK:STDOUT: !101 = !DILocation(line: 15, column: 3, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !106) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !106) // CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !21) // CHECK:STDOUT: !105 = !DILocation(line: 15, column: 3, scope: !103) // CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !110) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !21) // CHECK:STDOUT: !109 = !DILocation(line: 15, column: 3, scope: !107) // CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !114) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !114) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !21) // CHECK:STDOUT: !113 = !DILocation(line: 15, column: 3, scope: !111) // CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !118) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !80, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !118) // CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !21) // CHECK:STDOUT: !117 = !DILocation(line: 15, column: 3, scope: !115) // CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !122) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !21) -// CHECK:STDOUT: !121 = !DILocation(line: 15, column: 3, scope: !119) -// CHECK:STDOUT: !122 = !{!120} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !84, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !126) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !21) -// CHECK:STDOUT: !125 = !DILocation(line: 15, column: 3, scope: !123) -// CHECK:STDOUT: !126 = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'implicit_init_with_nonempty_nonconst.carbon' @@ -358,99 +336,92 @@ fn Run() { // CHECK:STDOUT: @Other.val.loc17_40.5 = internal constant { i32 } { i32 42 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !129 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %o.var = alloca { i32 }, align 4, !dbg !130 -// CHECK:STDOUT: %_.var = alloca <{ ptr, { i32 } }>, align 8, !dbg !132 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !130 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !132 -// CHECK:STDOUT: %.loc17_40.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 0, !dbg !135 -// CHECK:STDOUT: store ptr %o.var, ptr %.loc17_40.2.a, align 8, !dbg !135 -// CHECK:STDOUT: %.loc17_40.4.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 1, !dbg !135 -// CHECK:STDOUT: %.loc17_39.3.v = getelementptr inbounds nuw { i32 }, ptr %.loc17_40.4.b, i32 0, i32 0, !dbg !136 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc17_40.4.b, ptr align 4 @Other.val.loc17_40.5, i64 4, i1 false), !dbg !135 -// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !132 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !130 -// CHECK:STDOUT: ret i32 0, !dbg !138 +// CHECK:STDOUT: %o.var = alloca { i32 }, align 4, !dbg !122 +// CHECK:STDOUT: %_.var = alloca <{ ptr, { i32 } }>, align 8, !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !122 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !124 +// CHECK:STDOUT: %.loc17_40.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 0, !dbg !127 +// CHECK:STDOUT: store ptr %o.var, ptr %.loc17_40.2.a, align 8, !dbg !127 +// CHECK:STDOUT: %.loc17_40.4.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 1, !dbg !127 +// CHECK:STDOUT: %.loc17_39.3.v = getelementptr inbounds nuw { i32 }, ptr %.loc17_40.4.b, i32 0, i32 0, !dbg !128 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc17_40.4.b, ptr align 4 @Other.val.loc17_40.5, i64 4, i1 false), !dbg !127 +// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !124 +// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !122 +// CHECK:STDOUT: ret i32 0, !dbg !130 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !131 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !135 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !139 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !143 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core"(ptr %self) #0 !dbg !143 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !145 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92afc3a45a31c789:core.Destroy.Core"(ptr %self) #0 !dbg !147 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core"(ptr %self), !dbg !149 // CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !153 // CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core"(ptr %self) #0 !dbg !155 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !155 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self), !dbg !157 // CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92afc3a45a31c789:core.Destroy.Core"(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !159 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core"(ptr %self), !dbg !161 // CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !163 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self), !dbg !165 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !167 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !167 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self), !dbg !169 // CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !171 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !173 // CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !175 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self), !dbg !177 -// CHECK:STDOUT: ret void, !dbg !177 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !181 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !183 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !185 -// CHECK:STDOUT: ret void, !dbg !185 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -463,7 +434,7 @@ fn Run() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!128} +// CHECK:STDOUT: !llvm.dbg.cu = !{!120} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -476,60 +447,56 @@ fn Run() { // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) // CHECK:STDOUT: !28 = !{null, !21} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !127 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") -// CHECK:STDOUT: !128 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !127, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !127, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !128) -// CHECK:STDOUT: !130 = !DILocation(line: 14, column: 3, scope: !129) -// CHECK:STDOUT: !132 = !DILocation(line: 17, column: 3, scope: !129) -// CHECK:STDOUT: !135 = !DILocation(line: 17, column: 16, scope: !129) -// CHECK:STDOUT: !136 = !DILocation(line: 17, column: 31, scope: !129) -// CHECK:STDOUT: !138 = !DILocation(line: 13, column: 1, scope: !129) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !21) +// CHECK:STDOUT: !119 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") +// CHECK:STDOUT: !120 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !119, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !119, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !120) +// CHECK:STDOUT: !122 = !DILocation(line: 14, column: 3, scope: !121) +// CHECK:STDOUT: !124 = !DILocation(line: 17, column: 3, scope: !121) +// CHECK:STDOUT: !127 = !DILocation(line: 17, column: 16, scope: !121) +// CHECK:STDOUT: !128 = !DILocation(line: 17, column: 31, scope: !121) +// CHECK:STDOUT: !130 = !DILocation(line: 13, column: 1, scope: !121) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !134) +// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !21) +// CHECK:STDOUT: !133 = !DILocation(line: 17, column: 3, scope: !131) +// CHECK:STDOUT: !134 = !{!132} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !119, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !138) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !20) +// CHECK:STDOUT: !137 = !DILocation(line: 17, column: 3, scope: !135) +// CHECK:STDOUT: !138 = !{!136} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !119, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !142) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !20) // CHECK:STDOUT: !141 = !DILocation(line: 17, column: 3, scope: !139) // CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !127, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !146) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !20) +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !146) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !21) // CHECK:STDOUT: !145 = !DILocation(line: 17, column: 3, scope: !143) // CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !127, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !150) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !20) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92afc3a45a31c789:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !150) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !21) // CHECK:STDOUT: !149 = !DILocation(line: 17, column: 3, scope: !147) // CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !127, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !20) +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !154) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !21) // CHECK:STDOUT: !153 = !DILocation(line: 17, column: 3, scope: !151) // CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92afc3a45a31c789:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !158) +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !158) // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !21) // CHECK:STDOUT: !157 = !DILocation(line: 17, column: 3, scope: !155) // CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92afc3a45a31c789:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !162) +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !162) // CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !21) // CHECK:STDOUT: !161 = !DILocation(line: 17, column: 3, scope: !159) // CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !166) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !166) // CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !21) // CHECK:STDOUT: !165 = !DILocation(line: 17, column: 3, scope: !163) // CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !170) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !170) // CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !21) // CHECK:STDOUT: !169 = !DILocation(line: 17, column: 3, scope: !167) // CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !174) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !119, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !174) // CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !21) // CHECK:STDOUT: !173 = !DILocation(line: 17, column: 3, scope: !171) // CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !178) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !21) -// CHECK:STDOUT: !177 = !DILocation(line: 17, column: 3, scope: !175) -// CHECK:STDOUT: !178 = !{!176} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !21) -// CHECK:STDOUT: !181 = !DILocation(line: 17, column: 3, scope: !179) -// CHECK:STDOUT: !182 = !{!180} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !127, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !21) -// CHECK:STDOUT: !185 = !DILocation(line: 17, column: 3, scope: !183) -// CHECK:STDOUT: !186 = !{!184} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index a6afb436cb53..71168ad658cd 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -320,157 +320,150 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !147 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !153 // CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !155 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !155 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self), !dbg !157 // CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core"(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !159 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core"(ptr %self), !dbg !161 // CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !163 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self), !dbg !165 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %self) #0 !dbg !167 { +// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !167 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core"(ptr %self), !dbg !169 -// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !170 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !170 +// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !171 +// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !171 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !170 +// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !173 +// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !170 +// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !171 { +// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !177 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !174 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !174 -// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !175 -// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !175 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.29b.loc16_3, i64 8, i1 false), !dbg !174 -// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %c.var), !dbg !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core"(ptr %c.var), !dbg !174 -// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !180 +// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !180 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !180 +// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !181 +// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !181 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.0ea.loc26_3, i64 1, i1 false), !dbg !180 +// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !183 +// CHECK:STDOUT: call void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %c.var), !dbg !180 +// CHECK:STDOUT: ret void, !dbg !184 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !181 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !185 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !184 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !184 -// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !185 -// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !185 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.0ea.loc26_3, i64 1, i1 false), !dbg !184 -// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !187 -// CHECK:STDOUT: call void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %c.var), !dbg !184 -// CHECK:STDOUT: ret void, !dbg !188 +// CHECK:STDOUT: ret void, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !189 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !189 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !193 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !193 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self), !dbg !195 // CHECK:STDOUT: ret void, !dbg !195 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !197 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !197 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self), !dbg !199 // CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !201 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !201 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self), !dbg !203 // CHECK:STDOUT: ret void, !dbg !203 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core"(ptr %self) #0 !dbg !205 { +// CHECK:STDOUT: define void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !205 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core"(ptr %self), !dbg !207 -// CHECK:STDOUT: ret void, !dbg !207 +// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !208 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !208 +// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !209 +// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !209 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !210 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !210 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !210 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.727.loc31_3, i64 16, i1 false), !dbg !208 +// CHECK:STDOUT: call void @_CGetT.C.Main.03220e6718a91584(ptr %return, ptr %c.var), !dbg !212 +// CHECK:STDOUT: call void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %c.var), !dbg !208 +// CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !209 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !214 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !212 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !212 -// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !213 -// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !213 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !214 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !214 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !214 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.727.loc31_3, i64 16, i1 false), !dbg !212 -// CHECK:STDOUT: call void @_CGetT.C.Main.03220e6718a91584(ptr %return, ptr %c.var), !dbg !216 -// CHECK:STDOUT: call void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %c.var), !dbg !212 -// CHECK:STDOUT: ret void, !dbg !217 +// CHECK:STDOUT: ret void, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !218 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !218 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !220 // CHECK:STDOUT: ret void, !dbg !220 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !222 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !222 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !224 // CHECK:STDOUT: ret void, !dbg !224 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !226 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !226 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self), !dbg !228 // CHECK:STDOUT: ret void, !dbg !228 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core"(ptr %self) #0 !dbg !230 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !230 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core"(ptr %self), !dbg !232 // CHECK:STDOUT: ret void, !dbg !232 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !234 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !234 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self), !dbg !236 // CHECK:STDOUT: ret void, !dbg !236 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core"(ptr %self) #0 !dbg !238 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core"(ptr %self), !dbg !240 -// CHECK:STDOUT: ret void, !dbg !240 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -478,52 +471,52 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !242 { +// CHECK:STDOUT: define linkonce_odr i1 @_CGetBool.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !238 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !247 -// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !247 -// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !247 -// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !248 +// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !243 +// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !243 +// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !243 +// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !244 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !250 { +// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.4d6ceefeb7f772f4(ptr %self) #0 !dbg !246 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !255 -// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !255 -// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !256 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !251 +// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !251 +// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !252 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !258 { +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !254 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !263 -// CHECK:STDOUT: ret void, !dbg !264 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !259 +// CHECK:STDOUT: ret void, !dbg !260 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.03220e6718a91584(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !266 { +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.03220e6718a91584(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !262 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !271 -// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr %return, ptr %.loc9_16.1.w), !dbg !271 -// CHECK:STDOUT: ret void, !dbg !272 +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !267 +// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr %return, ptr %.loc9_16.1.w), !dbg !267 +// CHECK:STDOUT: ret void, !dbg !268 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !274 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !279 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !279 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !280 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !281 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !281 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !280 -// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !282 -// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !282 -// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !280 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !280 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !280 -// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !280 -// CHECK:STDOUT: ret void, !dbg !283 +// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !270 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !275 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !275 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !276 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !277 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !277 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !276 +// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !278 +// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !278 +// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !276 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !276 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !276 +// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !276 +// CHECK:STDOUT: ret void, !dbg !279 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -568,118 +561,114 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !36) // CHECK:STDOUT: !145 = !DILocation(line: 16, column: 3, scope: !143) // CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !121, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !150) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !121, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !150) // CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !36) // CHECK:STDOUT: !149 = !DILocation(line: 16, column: 3, scope: !147) // CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !121, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !36) +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !154) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !37) // CHECK:STDOUT: !153 = !DILocation(line: 16, column: 3, scope: !151) // CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !158) +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !158) // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !37) // CHECK:STDOUT: !157 = !DILocation(line: 16, column: 3, scope: !155) // CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.861652b2c489f7cc:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !162) +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !162) // CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !37) // CHECK:STDOUT: !161 = !DILocation(line: 16, column: 3, scope: !159) // CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !166) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !166) // CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !37) // CHECK:STDOUT: !165 = !DILocation(line: 16, column: 3, scope: !163) // CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d012f76a41f764ee:core.Destroy.Core", scope: null, file: !121, line: 16, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !170) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !37) -// CHECK:STDOUT: !169 = !DILocation(line: 16, column: 3, scope: !167) -// CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !121, line: 20, type: !128, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !174 = !DILocation(line: 21, column: 3, scope: !171) -// CHECK:STDOUT: !175 = !DILocation(line: 21, column: 19, scope: !171) -// CHECK:STDOUT: !177 = !DILocation(line: 22, column: 10, scope: !171) -// CHECK:STDOUT: !178 = !{!36, !37} -// CHECK:STDOUT: !179 = !DISubroutineType(types: !178) -// CHECK:STDOUT: !180 = !DILocation(line: 22, column: 3, scope: !171) -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !121, line: 25, type: !130, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !184 = !DILocation(line: 26, column: 3, scope: !181) -// CHECK:STDOUT: !185 = !DILocation(line: 26, column: 18, scope: !181) -// CHECK:STDOUT: !187 = !DILocation(line: 27, column: 10, scope: !181) -// CHECK:STDOUT: !188 = !DILocation(line: 27, column: 3, scope: !181) -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !192) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !121, line: 20, type: !128, spFlags: DISPFlagDefinition, unit: !122) +// CHECK:STDOUT: !170 = !DILocation(line: 21, column: 3, scope: !167) +// CHECK:STDOUT: !171 = !DILocation(line: 21, column: 19, scope: !167) +// CHECK:STDOUT: !173 = !DILocation(line: 22, column: 10, scope: !167) +// CHECK:STDOUT: !174 = !{!36, !37} +// CHECK:STDOUT: !175 = !DISubroutineType(types: !174) +// CHECK:STDOUT: !176 = !DILocation(line: 22, column: 3, scope: !167) +// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !121, line: 25, type: !130, spFlags: DISPFlagDefinition, unit: !122) +// CHECK:STDOUT: !180 = !DILocation(line: 26, column: 3, scope: !177) +// CHECK:STDOUT: !181 = !DILocation(line: 26, column: 18, scope: !177) +// CHECK:STDOUT: !183 = !DILocation(line: 27, column: 10, scope: !177) +// CHECK:STDOUT: !184 = !DILocation(line: 27, column: 3, scope: !177) +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !188) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !37) +// CHECK:STDOUT: !187 = !DILocation(line: 26, column: 3, scope: !185) +// CHECK:STDOUT: !188 = !{!186} +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !192) // CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !37) // CHECK:STDOUT: !191 = !DILocation(line: 26, column: 3, scope: !189) // CHECK:STDOUT: !192 = !{!190} -// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !196) +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !196) // CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !37) // CHECK:STDOUT: !195 = !DILocation(line: 26, column: 3, scope: !193) // CHECK:STDOUT: !196 = !{!194} -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !200) +// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !200) // CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !37) // CHECK:STDOUT: !199 = !DILocation(line: 26, column: 3, scope: !197) // CHECK:STDOUT: !200 = !{!198} -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !204) +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !204) // CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !37) // CHECK:STDOUT: !203 = !DILocation(line: 26, column: 3, scope: !201) // CHECK:STDOUT: !204 = !{!202} -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0477b985a5aa27cc:core.Destroy.Core", scope: null, file: !121, line: 26, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !208) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !37) -// CHECK:STDOUT: !207 = !DILocation(line: 26, column: 3, scope: !205) -// CHECK:STDOUT: !208 = !{!206} -// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !121, line: 30, type: !39, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !212 = !DILocation(line: 31, column: 3, scope: !209) -// CHECK:STDOUT: !213 = !DILocation(line: 31, column: 31, scope: !209) -// CHECK:STDOUT: !214 = !DILocation(line: 31, column: 48, scope: !209) -// CHECK:STDOUT: !216 = !DILocation(line: 32, column: 10, scope: !209) -// CHECK:STDOUT: !217 = !DILocation(line: 32, column: 3, scope: !209) -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !221) +// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !121, line: 30, type: !39, spFlags: DISPFlagDefinition, unit: !122) +// CHECK:STDOUT: !208 = !DILocation(line: 31, column: 3, scope: !205) +// CHECK:STDOUT: !209 = !DILocation(line: 31, column: 31, scope: !205) +// CHECK:STDOUT: !210 = !DILocation(line: 31, column: 48, scope: !205) +// CHECK:STDOUT: !212 = !DILocation(line: 32, column: 10, scope: !205) +// CHECK:STDOUT: !213 = !DILocation(line: 32, column: 3, scope: !205) +// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !217) +// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !37) +// CHECK:STDOUT: !216 = !DILocation(line: 31, column: 3, scope: !214) +// CHECK:STDOUT: !217 = !{!215} +// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !221) // CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !37) // CHECK:STDOUT: !220 = !DILocation(line: 31, column: 3, scope: !218) // CHECK:STDOUT: !221 = !{!219} -// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !225) +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !225) // CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !37) // CHECK:STDOUT: !224 = !DILocation(line: 31, column: 3, scope: !222) // CHECK:STDOUT: !225 = !{!223} -// CHECK:STDOUT: !226 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !229) +// CHECK:STDOUT: !226 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !229) // CHECK:STDOUT: !227 = !DILocalVariable(arg: 1, scope: !226, type: !37) // CHECK:STDOUT: !228 = !DILocation(line: 31, column: 3, scope: !226) // CHECK:STDOUT: !229 = !{!227} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1ada7ed46fb16378:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !233) +// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !233) // CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !37) // CHECK:STDOUT: !232 = !DILocation(line: 31, column: 3, scope: !230) // CHECK:STDOUT: !233 = !{!231} -// CHECK:STDOUT: !234 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !237) +// CHECK:STDOUT: !234 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !237) // CHECK:STDOUT: !235 = !DILocalVariable(arg: 1, scope: !234, type: !37) // CHECK:STDOUT: !236 = !DILocation(line: 31, column: 3, scope: !234) // CHECK:STDOUT: !237 = !{!235} -// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cffcf67f1271f67:core.Destroy.Core", scope: null, file: !121, line: 31, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !241) +// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 5, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !245) // CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !37) -// CHECK:STDOUT: !240 = !DILocation(line: 31, column: 3, scope: !238) -// CHECK:STDOUT: !241 = !{!239} -// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 5, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !249) -// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !37) -// CHECK:STDOUT: !247 = !DILocation(line: 6, column: 12, scope: !242) -// CHECK:STDOUT: !248 = !DILocation(line: 6, column: 5, scope: !242) -// CHECK:STDOUT: !249 = !{!243} -// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 8, type: !179, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !257) -// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !37) -// CHECK:STDOUT: !255 = !DILocation(line: 9, column: 12, scope: !250) -// CHECK:STDOUT: !256 = !DILocation(line: 9, column: 5, scope: !250) -// CHECK:STDOUT: !257 = !{!251} -// CHECK:STDOUT: !258 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !121, line: 8, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !265) -// CHECK:STDOUT: !259 = !DILocalVariable(arg: 1, scope: !258, type: !37) -// CHECK:STDOUT: !263 = !DILocation(line: 9, column: 12, scope: !258) -// CHECK:STDOUT: !264 = !DILocation(line: 9, column: 5, scope: !258) -// CHECK:STDOUT: !265 = !{!259} -// CHECK:STDOUT: !266 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.03220e6718a91584", scope: null, file: !121, line: 8, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !273) -// CHECK:STDOUT: !267 = !DILocalVariable(arg: 1, scope: !266, type: !37) -// CHECK:STDOUT: !271 = !DILocation(line: 9, column: 12, scope: !266) -// CHECK:STDOUT: !272 = !DILocation(line: 9, column: 5, scope: !266) -// CHECK:STDOUT: !273 = !{!267} -// CHECK:STDOUT: !274 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302", scope: null, file: !9, line: 58, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !284) -// CHECK:STDOUT: !275 = !DILocalVariable(arg: 1, scope: !274, type: !37) -// CHECK:STDOUT: !279 = !DILocation(line: 59, column: 13, scope: !274) -// CHECK:STDOUT: !280 = !DILocation(line: 59, column: 12, scope: !274) -// CHECK:STDOUT: !281 = !DILocation(line: 59, column: 26, scope: !274) -// CHECK:STDOUT: !282 = !DILocation(line: 59, column: 39, scope: !274) -// CHECK:STDOUT: !283 = !DILocation(line: 59, column: 5, scope: !274) -// CHECK:STDOUT: !284 = !{!275} +// CHECK:STDOUT: !243 = !DILocation(line: 6, column: 12, scope: !238) +// CHECK:STDOUT: !244 = !DILocation(line: 6, column: 5, scope: !238) +// CHECK:STDOUT: !245 = !{!239} +// CHECK:STDOUT: !246 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.4d6ceefeb7f772f4", scope: null, file: !121, line: 8, type: !175, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !253) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 1, scope: !246, type: !37) +// CHECK:STDOUT: !251 = !DILocation(line: 9, column: 12, scope: !246) +// CHECK:STDOUT: !252 = !DILocation(line: 9, column: 5, scope: !246) +// CHECK:STDOUT: !253 = !{!247} +// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !121, line: 8, type: !124, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !261) +// CHECK:STDOUT: !255 = !DILocalVariable(arg: 1, scope: !254, type: !37) +// CHECK:STDOUT: !259 = !DILocation(line: 9, column: 12, scope: !254) +// CHECK:STDOUT: !260 = !DILocation(line: 9, column: 5, scope: !254) +// CHECK:STDOUT: !261 = !{!255} +// CHECK:STDOUT: !262 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.03220e6718a91584", scope: null, file: !121, line: 8, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !269) +// CHECK:STDOUT: !263 = !DILocalVariable(arg: 1, scope: !262, type: !37) +// CHECK:STDOUT: !267 = !DILocation(line: 9, column: 12, scope: !262) +// CHECK:STDOUT: !268 = !DILocation(line: 9, column: 5, scope: !262) +// CHECK:STDOUT: !269 = !{!263} +// CHECK:STDOUT: !270 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.c9f31a0e20c75302", scope: null, file: !9, line: 58, type: !108, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !280) +// CHECK:STDOUT: !271 = !DILocalVariable(arg: 1, scope: !270, type: !37) +// CHECK:STDOUT: !275 = !DILocation(line: 59, column: 13, scope: !270) +// CHECK:STDOUT: !276 = !DILocation(line: 59, column: 12, scope: !270) +// CHECK:STDOUT: !277 = !DILocation(line: 59, column: 26, scope: !270) +// CHECK:STDOUT: !278 = !DILocation(line: 59, column: 39, scope: !270) +// CHECK:STDOUT: !279 = !DILocation(line: 59, column: 5, scope: !270) +// CHECK:STDOUT: !280 = !{!271} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/static.carbon b/toolchain/lower/testdata/class/static.carbon index 10fbe93badc9..2a74cf5af8b0 100644 --- a/toolchain/lower/testdata/class/static.carbon +++ b/toolchain/lower/testdata/class/static.carbon @@ -115,30 +115,23 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #2 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #2 !dbg !51 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #2 !dbg !55 { +// CHECK:STDOUT: define i32 @main() #2 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: %F.call = call i32 @_Z1Fv(), !dbg !58 +// CHECK:STDOUT: ret i32 %F.call, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #2 !dbg !59 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #2 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_Z1Fv(), !dbg !62 -// CHECK:STDOUT: ret i32 %F.call, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #2 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: store i32 123, ptr @_Cx.C.Main, align 4, !dbg !65 -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: store i32 123, ptr @_Cx.C.Main, align 4, !dbg !61 +// CHECK:STDOUT: ret void, !dbg !62 // 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" } @@ -146,8 +139,8 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!37} -// CHECK:STDOUT: !llvm.module.flags = !{!67, !68, !69, !6, !7} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!71} +// CHECK:STDOUT: !llvm.module.flags = !{!63, !64, !65, !6, !7} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!67} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -173,23 +166,19 @@ fn Run() -> i32 { // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !38) // CHECK:STDOUT: !49 = !DILocation(line: 4, column: 1, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !36, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !36, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !38) // CHECK:STDOUT: !53 = !DILocation(line: 4, column: 1, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !36, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !38) -// CHECK:STDOUT: !57 = !DILocation(line: 4, column: 1, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !36, line: 14, type: !42, spFlags: DISPFlagDefinition, unit: !37) -// CHECK:STDOUT: !62 = !DILocation(line: 15, column: 10, scope: !59) -// CHECK:STDOUT: !63 = !DILocation(line: 15, column: 3, scope: !59) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !36, type: !26, spFlags: DISPFlagDefinition, unit: !37) -// CHECK:STDOUT: !65 = !DILocation(line: 5, column: 10, scope: !64) -// CHECK:STDOUT: !66 = !DILocation(line: 0, scope: !64) -// CHECK:STDOUT: !67 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !68 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !69 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !70 = !{!"__libc_errno", !2, i64 0} -// CHECK:STDOUT: !71 = !{!70, !2, i64 0} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !36, line: 14, type: !42, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !58 = !DILocation(line: 15, column: 10, scope: !55) +// CHECK:STDOUT: !59 = !DILocation(line: 15, column: 3, scope: !55) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !36, type: !26, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !61 = !DILocation(line: 5, column: 10, scope: !60) +// CHECK:STDOUT: !62 = !DILocation(line: 0, scope: !60) +// CHECK:STDOUT: !63 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !64 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !65 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !66 = !{!"__libc_errno", !2, i64 0} +// CHECK:STDOUT: !67 = !{!66, !2, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index 5748abfac347..f8692f1d182a 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -320,77 +320,70 @@ fn Use() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bf085e1f873e33df:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bf085e1f873e33df:core.Destroy.Core"(ptr %self), !dbg !69 // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4487e305711510e9:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core"(ptr %self), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4487e305711510e9:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core"(ptr %self), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3c3534e993db7939:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core"(ptr %self), !dbg !89 // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3c3534e993db7939:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self) #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core"(ptr %self), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self), !dbg !97 // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define void @_CUse.Create(ptr %v) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Create(ptr %v) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Intermediate.Fn.call.vtable = load ptr, ptr %v, align 8, !dbg !106 -// CHECK:STDOUT: %Intermediate.Fn.call = call ptr @llvm.load.relative.i32(ptr %Intermediate.Fn.call.vtable, i32 0), !dbg !106 -// CHECK:STDOUT: call void %Intermediate.Fn.call(ptr %v), !dbg !106 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: %Intermediate.Fn.call.vtable = load ptr, ptr %v, align 8, !dbg !102 +// CHECK:STDOUT: %Intermediate.Fn.call = call ptr @llvm.load.relative.i32(ptr %Intermediate.Fn.call.vtable, i32 0), !dbg !102 +// CHECK:STDOUT: call void %Intermediate.Fn.call(ptr %v), !dbg !102 +// CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -440,51 +433,47 @@ fn Use() { // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !20) // CHECK:STDOUT: !61 = !DILocation(line: 12, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bf085e1f873e33df:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !20) // CHECK:STDOUT: !65 = !DILocation(line: 12, column: 3, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !20) // CHECK:STDOUT: !69 = !DILocation(line: 12, column: 3, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !20) // CHECK:STDOUT: !73 = !DILocation(line: 12, column: 3, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !20) // CHECK:STDOUT: !77 = !DILocation(line: 12, column: 3, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4487e305711510e9:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !20) // CHECK:STDOUT: !81 = !DILocation(line: 12, column: 3, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4487e305711510e9:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !20) // CHECK:STDOUT: !85 = !DILocation(line: 12, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3c3534e993db7939:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !20) // CHECK:STDOUT: !89 = !DILocation(line: 12, column: 3, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3c3534e993db7939:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !94) // CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !20) // CHECK:STDOUT: !93 = !DILocation(line: 12, column: 3, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !98) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !98) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !20) // CHECK:STDOUT: !97 = !DILocation(line: 12, column: 3, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !102) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Create", scope: null, file: !38, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !104) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !20) -// CHECK:STDOUT: !101 = !DILocation(line: 12, column: 3, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Create", scope: null, file: !38, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !108) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !20) -// CHECK:STDOUT: !106 = !DILocation(line: 16, column: 3, scope: !103) -// CHECK:STDOUT: !107 = !DILocation(line: 15, column: 1, scope: !103) -// CHECK:STDOUT: !108 = !{!104} +// CHECK:STDOUT: !102 = !DILocation(line: 16, column: 3, scope: !99) +// CHECK:STDOUT: !103 = !DILocation(line: 15, column: 1, scope: !99) +// CHECK:STDOUT: !104 = !{!100} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'create_named_ctor.carbon' @@ -495,62 +484,62 @@ fn Use() { // CHECK:STDOUT: @empty_struct.ac8.loc7_12 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakePartialBase.Main(ptr sret({}) %return) #0 !dbg !113 { +// CHECK:STDOUT: define void @_CMakePartialBase.Main(ptr sret({}) %return) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @empty_struct.ac8.loc7_12, i64 0, i1 false), !dbg !116 -// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @empty_struct.ac8.loc7_12, i64 0, i1 false), !dbg !112 +// CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakePartialIntermediate.Main(ptr sret({ ptr, {} }) %return) #0 !dbg !117 { +// CHECK:STDOUT: define void @_CMakePartialIntermediate.Main(ptr sret({ ptr, {} }) %return) #0 !dbg !113 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_36.1.base = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 1, !dbg !120 -// CHECK:STDOUT: call void @_CMakePartialBase.Main(ptr %.loc11_36.1.base), !dbg !121 -// CHECK:STDOUT: %.loc11_36.3.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 0, !dbg !120 -// CHECK:STDOUT: store ptr poison, ptr %.loc11_36.3.vptr, align 8, !dbg !120 -// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: %.loc11_36.1.base = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 1, !dbg !116 +// CHECK:STDOUT: call void @_CMakePartialBase.Main(ptr %.loc11_36.1.base), !dbg !117 +// CHECK:STDOUT: %.loc11_36.3.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 0, !dbg !116 +// CHECK:STDOUT: store ptr poison, ptr %.loc11_36.3.vptr, align 8, !dbg !116 +// CHECK:STDOUT: ret void, !dbg !118 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeBase.Main(ptr sret({}) %return) #0 !dbg !123 { +// CHECK:STDOUT: define void @_CMakeBase.Main(ptr sret({}) %return) #0 !dbg !119 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMakePartialBase.Main(ptr %return), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: call void @_CMakePartialBase.Main(ptr %return), !dbg !122 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeIntermediate.Main(ptr sret({ ptr, {} }) %return) #0 !dbg !128 { +// CHECK:STDOUT: define void @_CMakeIntermediate.Main(ptr sret({ ptr, {} }) %return) #0 !dbg !124 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMakePartialIntermediate.Main(ptr %return), !dbg !131 -// CHECK:STDOUT: %.loc19_34.1.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 0, !dbg !131 -// CHECK:STDOUT: store ptr @"_CIntermediate.Classes.$vtable", ptr %.loc19_34.1.vptr, align 8, !dbg !131 -// CHECK:STDOUT: ret void, !dbg !132 +// CHECK:STDOUT: call void @_CMakePartialIntermediate.Main(ptr %return), !dbg !127 +// CHECK:STDOUT: %.loc19_34.1.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %return, i32 0, i32 0, !dbg !127 +// CHECK:STDOUT: store ptr @"_CIntermediate.Classes.$vtable", ptr %.loc19_34.1.vptr, align 8, !dbg !127 +// CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CFn.Intermediate.Classes(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeDerivedFromPartial.Main(ptr sret({ { ptr, {} } }) %return) #0 !dbg !133 { +// CHECK:STDOUT: define void @_CMakeDerivedFromPartial.Main(ptr sret({ { ptr, {} } }) %return) #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_44.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !136 -// CHECK:STDOUT: call void @_CMakePartialIntermediate.Main(ptr %.loc23_44.1.base), !dbg !137 -// CHECK:STDOUT: %.loc23_44.5.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !136 -// CHECK:STDOUT: %.loc23_44.6.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %.loc23_44.5.base, i32 0, i32 0, !dbg !136 -// CHECK:STDOUT: store ptr @"_CDerived.Classes.$vtable", ptr %.loc23_44.6.vptr, align 8, !dbg !136 -// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: %.loc23_44.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !132 +// CHECK:STDOUT: call void @_CMakePartialIntermediate.Main(ptr %.loc23_44.1.base), !dbg !133 +// CHECK:STDOUT: %.loc23_44.5.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !132 +// CHECK:STDOUT: %.loc23_44.6.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %.loc23_44.5.base, i32 0, i32 0, !dbg !132 +// CHECK:STDOUT: store ptr @"_CDerived.Classes.$vtable", ptr %.loc23_44.6.vptr, align 8, !dbg !132 +// CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CFn:thunk:Intermediate.Classes:Derived.Classes"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeDerivedFromNonPartial.Main(ptr sret({ { ptr, {} } }) %return) #0 !dbg !139 { +// CHECK:STDOUT: define void @_CMakeDerivedFromNonPartial.Main(ptr sret({ { ptr, {} } }) %return) #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_37.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !142 -// CHECK:STDOUT: call void @_CMakeIntermediate.Main(ptr %.loc27_37.1.base), !dbg !143 -// CHECK:STDOUT: %.loc27_37.7.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !142 -// CHECK:STDOUT: %.loc27_37.8.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %.loc27_37.7.base, i32 0, i32 0, !dbg !142 -// CHECK:STDOUT: store ptr @"_CDerived.Classes.$vtable", ptr %.loc27_37.8.vptr, align 8, !dbg !142 -// CHECK:STDOUT: ret void, !dbg !144 +// CHECK:STDOUT: %.loc27_37.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !138 +// CHECK:STDOUT: call void @_CMakeIntermediate.Main(ptr %.loc27_37.1.base), !dbg !139 +// CHECK:STDOUT: %.loc27_37.7.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %return, i32 0, i32 0, !dbg !138 +// CHECK:STDOUT: %.loc27_37.8.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %.loc27_37.7.base, i32 0, i32 0, !dbg !138 +// CHECK:STDOUT: store ptr @"_CDerived.Classes.$vtable", ptr %.loc27_37.8.vptr, align 8, !dbg !138 +// CHECK:STDOUT: ret void, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -559,36 +548,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.dbg.cu = !{!110} +// CHECK:STDOUT: !llvm.dbg.cu = !{!106} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !109 = !DIFile(filename: "create_named_ctor.carbon", directory: "") -// CHECK:STDOUT: !110 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !109, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !111 = !{!20} -// CHECK:STDOUT: !112 = !DISubroutineType(types: !111) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "MakePartialBase", linkageName: "_CMakePartialBase.Main", scope: null, file: !109, line: 6, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !116 = !DILocation(line: 7, column: 3, scope: !113) -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "MakePartialIntermediate", linkageName: "_CMakePartialIntermediate.Main", scope: null, file: !109, line: 10, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !120 = !DILocation(line: 11, column: 10, scope: !117) -// CHECK:STDOUT: !121 = !DILocation(line: 11, column: 19, scope: !117) -// CHECK:STDOUT: !122 = !DILocation(line: 11, column: 3, scope: !117) -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "MakeBase", linkageName: "_CMakeBase.Main", scope: null, file: !109, line: 14, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !126 = !DILocation(line: 15, column: 10, scope: !123) -// CHECK:STDOUT: !127 = !DILocation(line: 15, column: 3, scope: !123) -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "MakeIntermediate", linkageName: "_CMakeIntermediate.Main", scope: null, file: !109, line: 18, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !131 = !DILocation(line: 19, column: 10, scope: !128) -// CHECK:STDOUT: !132 = !DILocation(line: 19, column: 3, scope: !128) -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "MakeDerivedFromPartial", linkageName: "_CMakeDerivedFromPartial.Main", scope: null, file: !109, line: 22, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !136 = !DILocation(line: 23, column: 10, scope: !133) -// CHECK:STDOUT: !137 = !DILocation(line: 23, column: 19, scope: !133) -// CHECK:STDOUT: !138 = !DILocation(line: 23, column: 3, scope: !133) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "MakeDerivedFromNonPartial", linkageName: "_CMakeDerivedFromNonPartial.Main", scope: null, file: !109, line: 26, type: !112, spFlags: DISPFlagDefinition, unit: !110) -// CHECK:STDOUT: !142 = !DILocation(line: 27, column: 10, scope: !139) -// CHECK:STDOUT: !143 = !DILocation(line: 27, column: 19, scope: !139) -// CHECK:STDOUT: !144 = !DILocation(line: 27, column: 3, scope: !139) +// CHECK:STDOUT: !105 = !DIFile(filename: "create_named_ctor.carbon", directory: "") +// CHECK:STDOUT: !106 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !105, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !107 = !{!20} +// CHECK:STDOUT: !108 = !DISubroutineType(types: !107) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "MakePartialBase", linkageName: "_CMakePartialBase.Main", scope: null, file: !105, line: 6, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !112 = !DILocation(line: 7, column: 3, scope: !109) +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "MakePartialIntermediate", linkageName: "_CMakePartialIntermediate.Main", scope: null, file: !105, line: 10, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !116 = !DILocation(line: 11, column: 10, scope: !113) +// CHECK:STDOUT: !117 = !DILocation(line: 11, column: 19, scope: !113) +// CHECK:STDOUT: !118 = !DILocation(line: 11, column: 3, scope: !113) +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "MakeBase", linkageName: "_CMakeBase.Main", scope: null, file: !105, line: 14, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !122 = !DILocation(line: 15, column: 10, scope: !119) +// CHECK:STDOUT: !123 = !DILocation(line: 15, column: 3, scope: !119) +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "MakeIntermediate", linkageName: "_CMakeIntermediate.Main", scope: null, file: !105, line: 18, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !127 = !DILocation(line: 19, column: 10, scope: !124) +// CHECK:STDOUT: !128 = !DILocation(line: 19, column: 3, scope: !124) +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "MakeDerivedFromPartial", linkageName: "_CMakeDerivedFromPartial.Main", scope: null, file: !105, line: 22, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !132 = !DILocation(line: 23, column: 10, scope: !129) +// CHECK:STDOUT: !133 = !DILocation(line: 23, column: 19, scope: !129) +// CHECK:STDOUT: !134 = !DILocation(line: 23, column: 3, scope: !129) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "MakeDerivedFromNonPartial", linkageName: "_CMakeDerivedFromNonPartial.Main", scope: null, file: !105, line: 26, type: !108, spFlags: DISPFlagDefinition, unit: !106) +// CHECK:STDOUT: !138 = !DILocation(line: 27, column: 10, scope: !135) +// CHECK:STDOUT: !139 = !DILocation(line: 27, column: 19, scope: !135) +// CHECK:STDOUT: !140 = !DILocation(line: 27, column: 3, scope: !135) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'member_init.carbon' @@ -598,88 +587,81 @@ fn Use() { // CHECK:STDOUT: @Base.val.loc13_3 = internal constant <{ ptr, i32 }> <{ ptr @"_CBase.MemberInit.$vtable", i32 3 }> // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFn.Base.MemberInit(ptr %self) #0 !dbg !150 { +// CHECK:STDOUT: define void @_CFn.Base.MemberInit(ptr %self) #0 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFn.MemberInit() #0 !dbg !155 { +// CHECK:STDOUT: define void @_CFn.MemberInit() #0 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %i.var = alloca i32, align 4, !dbg !156 -// CHECK:STDOUT: %v.var = alloca <{ ptr, i32 }>, align 8, !dbg !158 -// CHECK:STDOUT: %_.var = alloca <{ ptr, i32 }>, align 8, !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !156 -// CHECK:STDOUT: store i32 3, ptr %i.var, align 4, !dbg !156 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !158 -// CHECK:STDOUT: %.loc11_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 0, !dbg !160 -// CHECK:STDOUT: %.loc11_23 = load i32, ptr %i.var, align 4, !dbg !159 -// CHECK:STDOUT: %.loc11_24.4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !160 -// CHECK:STDOUT: store i32 %.loc11_23, ptr %.loc11_24.4.m, align 4, !dbg !160 -// CHECK:STDOUT: store ptr @"_CBase.MemberInit.$vtable", ptr %.loc11_24.2.vptr, align 8, !dbg !160 -// CHECK:STDOUT: %.loc12_4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !162 -// CHECK:STDOUT: store i32 5, ptr %.loc12_4.m, align 4, !dbg !162 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !163 -// CHECK:STDOUT: %.loc13_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 0, !dbg !164 -// CHECK:STDOUT: %.loc13_24.5.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 1, !dbg !164 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var, ptr align 8 @Base.val.loc13_3, i64 12, i1 false), !dbg !163 -// CHECK:STDOUT: call void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %_.var), !dbg !163 -// CHECK:STDOUT: call void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %v.var), !dbg !158 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %i.var), !dbg !156 -// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: %i.var = alloca i32, align 4, !dbg !152 +// CHECK:STDOUT: %v.var = alloca <{ ptr, i32 }>, align 8, !dbg !154 +// CHECK:STDOUT: %_.var = alloca <{ ptr, i32 }>, align 8, !dbg !159 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !152 +// CHECK:STDOUT: store i32 3, ptr %i.var, align 4, !dbg !152 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !154 +// CHECK:STDOUT: %.loc11_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 0, !dbg !156 +// CHECK:STDOUT: %.loc11_23 = load i32, ptr %i.var, align 4, !dbg !155 +// CHECK:STDOUT: %.loc11_24.4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !156 +// CHECK:STDOUT: store i32 %.loc11_23, ptr %.loc11_24.4.m, align 4, !dbg !156 +// CHECK:STDOUT: store ptr @"_CBase.MemberInit.$vtable", ptr %.loc11_24.2.vptr, align 8, !dbg !156 +// CHECK:STDOUT: %.loc12_4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !158 +// CHECK:STDOUT: store i32 5, ptr %.loc12_4.m, align 4, !dbg !158 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !159 +// CHECK:STDOUT: %.loc13_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 0, !dbg !160 +// CHECK:STDOUT: %.loc13_24.5.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 1, !dbg !160 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var, ptr align 8 @Base.val.loc13_3, i64 12, i1 false), !dbg !159 +// CHECK:STDOUT: call void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %_.var), !dbg !159 +// CHECK:STDOUT: call void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %v.var), !dbg !154 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %i.var), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !162 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !167 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !167 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !171 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !175 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self) #0 !dbg !175 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !177 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !179 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self) #0 !dbg !179 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !181 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self), !dbg !181 // CHECK:STDOUT: ret void, !dbg !181 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !183 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !185 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !187 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core"(ptr %self), !dbg !189 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self), !dbg !189 // CHECK:STDOUT: ret void, !dbg !189 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !191 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !193 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !195 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self), !dbg !197 -// CHECK:STDOUT: ret void, !dbg !197 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -693,7 +675,7 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!146} +// CHECK:STDOUT: !llvm.dbg.cu = !{!142} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -703,56 +685,52 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !145 = !DIFile(filename: "member_init.carbon", directory: "") -// CHECK:STDOUT: !146 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !145, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !147 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !148 = !{null, !147} -// CHECK:STDOUT: !149 = !DISubroutineType(types: !148) -// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Base.MemberInit", scope: null, file: !145, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !154) -// CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !20) -// CHECK:STDOUT: !153 = !DILocation(line: 6, column: 3, scope: !150) -// CHECK:STDOUT: !154 = !{!151} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.MemberInit", scope: null, file: !145, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !146) -// CHECK:STDOUT: !156 = !DILocation(line: 10, column: 3, scope: !155) -// CHECK:STDOUT: !158 = !DILocation(line: 11, column: 3, scope: !155) -// CHECK:STDOUT: !159 = !DILocation(line: 11, column: 23, scope: !155) -// CHECK:STDOUT: !160 = !DILocation(line: 11, column: 17, scope: !155) -// CHECK:STDOUT: !162 = !DILocation(line: 12, column: 3, scope: !155) -// CHECK:STDOUT: !163 = !DILocation(line: 13, column: 3, scope: !155) -// CHECK:STDOUT: !164 = !DILocation(line: 13, column: 17, scope: !155) -// CHECK:STDOUT: !166 = !DILocation(line: 9, column: 1, scope: !155) -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !145, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !170) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !20) +// CHECK:STDOUT: !141 = !DIFile(filename: "member_init.carbon", directory: "") +// CHECK:STDOUT: !142 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !141, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !143 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !144 = !{null, !143} +// CHECK:STDOUT: !145 = !DISubroutineType(types: !144) +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Base.MemberInit", scope: null, file: !141, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !150) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !20) +// CHECK:STDOUT: !149 = !DILocation(line: 6, column: 3, scope: !146) +// CHECK:STDOUT: !150 = !{!147} +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.MemberInit", scope: null, file: !141, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !142) +// CHECK:STDOUT: !152 = !DILocation(line: 10, column: 3, scope: !151) +// CHECK:STDOUT: !154 = !DILocation(line: 11, column: 3, scope: !151) +// CHECK:STDOUT: !155 = !DILocation(line: 11, column: 23, scope: !151) +// CHECK:STDOUT: !156 = !DILocation(line: 11, column: 17, scope: !151) +// CHECK:STDOUT: !158 = !DILocation(line: 12, column: 3, scope: !151) +// CHECK:STDOUT: !159 = !DILocation(line: 13, column: 3, scope: !151) +// CHECK:STDOUT: !160 = !DILocation(line: 13, column: 17, scope: !151) +// CHECK:STDOUT: !162 = !DILocation(line: 9, column: 1, scope: !151) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !166) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !20) +// CHECK:STDOUT: !165 = !DILocation(line: 13, column: 3, scope: !163) +// CHECK:STDOUT: !166 = !{!164} +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !141, line: 13, type: !145, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !170) +// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !143) // CHECK:STDOUT: !169 = !DILocation(line: 13, column: 3, scope: !167) // CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !145, line: 13, type: !149, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !174) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !147) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !141, line: 13, type: !145, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !174) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !143) // CHECK:STDOUT: !173 = !DILocation(line: 13, column: 3, scope: !171) // CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !145, line: 13, type: !149, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !178) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !147) +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !178) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !20) // CHECK:STDOUT: !177 = !DILocation(line: 13, column: 3, scope: !175) // CHECK:STDOUT: !178 = !{!176} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !145, line: 13, type: !149, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !147) +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fd9d4a98e93fc879:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !182) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !20) // CHECK:STDOUT: !181 = !DILocation(line: 13, column: 3, scope: !179) // CHECK:STDOUT: !182 = !{!180} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fd9d4a98e93fc879:core.Destroy.Core", scope: null, file: !145, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !186) +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !186) // CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !20) // CHECK:STDOUT: !185 = !DILocation(line: 13, column: 3, scope: !183) // CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fd9d4a98e93fc879:core.Destroy.Core", scope: null, file: !145, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !190) +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !190) // CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !20) // CHECK:STDOUT: !189 = !DILocation(line: 13, column: 3, scope: !187) // CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c6dbe0017b4c8d16:core.Destroy.Core", scope: null, file: !145, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !20) -// CHECK:STDOUT: !193 = !DILocation(line: 13, column: 3, scope: !191) -// CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core", scope: null, file: !145, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !20) -// CHECK:STDOUT: !197 = !DILocation(line: 13, column: 3, scope: !195) -// CHECK:STDOUT: !198 = !{!196} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'member_brace_init.carbon' @@ -765,78 +743,78 @@ fn Use() { // CHECK:STDOUT: declare void @_CF.Base.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !201 { +// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !193 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !202 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !202 -// CHECK:STDOUT: %.loc13_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !203 -// CHECK:STDOUT: %.loc13_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.2.base, i32 0, i32 0, !dbg !204 -// CHECK:STDOUT: %.loc13_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !203 -// CHECK:STDOUT: %.loc13_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.6.base, i32 0, i32 0, !dbg !203 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var, ptr align 8 @Derived.val.loc13_32.5, i64 8, i1 false), !dbg !203 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc13_32.7.vptr, align 8, !dbg !203 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !202 -// CHECK:STDOUT: ret void, !dbg !206 +// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !194 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !194 +// CHECK:STDOUT: %.loc13_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !195 +// CHECK:STDOUT: %.loc13_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.2.base, i32 0, i32 0, !dbg !196 +// CHECK:STDOUT: %.loc13_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !195 +// CHECK:STDOUT: %.loc13_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.6.base, i32 0, i32 0, !dbg !195 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var, ptr align 8 @Derived.val.loc13_32.5, i64 8, i1 false), !dbg !195 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc13_32.7.vptr, align 8, !dbg !195 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !194 +// CHECK:STDOUT: ret void, !dbg !198 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !199 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !203 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !209 // CHECK:STDOUT: ret void, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !211 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !217 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !217 // CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !223 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !225 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !225 // CHECK:STDOUT: ret void, !dbg !225 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !227 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !227 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !229 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !231 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !231 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !233 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !233 // CHECK:STDOUT: ret void, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !235 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !237 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !239 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !241 -// CHECK:STDOUT: ret void, !dbg !241 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -846,7 +824,7 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!200} +// CHECK:STDOUT: !llvm.dbg.cu = !{!192} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -856,49 +834,49 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !199 = !DIFile(filename: "member_brace_init.carbon", directory: "") -// CHECK:STDOUT: !200 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !199, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !199, line: 12, type: !41, spFlags: DISPFlagDefinition, unit: !200) -// CHECK:STDOUT: !202 = !DILocation(line: 13, column: 3, scope: !201) -// CHECK:STDOUT: !203 = !DILocation(line: 13, column: 21, scope: !201) -// CHECK:STDOUT: !204 = !DILocation(line: 13, column: 30, scope: !201) -// CHECK:STDOUT: !206 = !DILocation(line: 12, column: 1, scope: !201) -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !210) +// CHECK:STDOUT: !191 = !DIFile(filename: "member_brace_init.carbon", directory: "") +// CHECK:STDOUT: !192 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !191, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !191, line: 12, type: !41, spFlags: DISPFlagDefinition, unit: !192) +// CHECK:STDOUT: !194 = !DILocation(line: 13, column: 3, scope: !193) +// CHECK:STDOUT: !195 = !DILocation(line: 13, column: 21, scope: !193) +// CHECK:STDOUT: !196 = !DILocation(line: 13, column: 30, scope: !193) +// CHECK:STDOUT: !198 = !DILocation(line: 12, column: 1, scope: !193) +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !20) +// CHECK:STDOUT: !201 = !DILocation(line: 13, column: 3, scope: !199) +// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !206) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !20) +// CHECK:STDOUT: !205 = !DILocation(line: 13, column: 3, scope: !203) +// CHECK:STDOUT: !206 = !{!204} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !210) // CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !20) // CHECK:STDOUT: !209 = !DILocation(line: 13, column: 3, scope: !207) // CHECK:STDOUT: !210 = !{!208} -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !214) +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !214) // CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !20) // CHECK:STDOUT: !213 = !DILocation(line: 13, column: 3, scope: !211) // CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !218) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !218) // CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !20) // CHECK:STDOUT: !217 = !DILocation(line: 13, column: 3, scope: !215) // CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !222) +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !222) // CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !20) // CHECK:STDOUT: !221 = !DILocation(line: 13, column: 3, scope: !219) // CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !226) +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !226) // CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !20) // CHECK:STDOUT: !225 = !DILocation(line: 13, column: 3, scope: !223) // CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !230) +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !230) // CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !20) // CHECK:STDOUT: !229 = !DILocation(line: 13, column: 3, scope: !227) // CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !234) +// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !191, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !192, retainedNodes: !234) // CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !20) // CHECK:STDOUT: !233 = !DILocation(line: 13, column: 3, scope: !231) // CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !238) -// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !20) -// CHECK:STDOUT: !237 = !DILocation(line: 13, column: 3, scope: !235) -// CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !199, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !200, retainedNodes: !242) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !20) -// CHECK:STDOUT: !241 = !DILocation(line: 13, column: 3, scope: !239) -// CHECK:STDOUT: !242 = !{!240} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call.carbon' @@ -909,12 +887,12 @@ fn Use() { // CHECK:STDOUT: declare void @_CF.Base.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main(ptr %b) #0 !dbg !245 { +// CHECK:STDOUT: define void @_CUse.Main(ptr %b) #0 !dbg !237 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %b, align 8, !dbg !248 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !248 -// CHECK:STDOUT: call void %Base.F.call(ptr %b), !dbg !248 -// CHECK:STDOUT: ret void, !dbg !249 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %b, align 8, !dbg !240 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !240 +// CHECK:STDOUT: call void %Base.F.call(ptr %b), !dbg !240 +// CHECK:STDOUT: ret void, !dbg !241 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) @@ -923,7 +901,7 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!244} +// CHECK:STDOUT: !llvm.dbg.cu = !{!236} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -931,13 +909,13 @@ fn Use() { // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !21 = !{null, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !243 = !DIFile(filename: "call.carbon", directory: "") -// CHECK:STDOUT: !244 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !243, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !243, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !250) -// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !20) -// CHECK:STDOUT: !248 = !DILocation(line: 9, column: 3, scope: !245) -// CHECK:STDOUT: !249 = !DILocation(line: 8, column: 1, scope: !245) -// CHECK:STDOUT: !250 = !{!246} +// CHECK:STDOUT: !235 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !236 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !235, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !237 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !235, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !236, retainedNodes: !242) +// CHECK:STDOUT: !238 = !DILocalVariable(arg: 1, scope: !237, type: !20) +// CHECK:STDOUT: !240 = !DILocation(line: 9, column: 3, scope: !237) +// CHECK:STDOUT: !241 = !DILocation(line: 8, column: 1, scope: !237) +// CHECK:STDOUT: !242 = !{!238} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_impl.carbon' @@ -952,89 +930,89 @@ fn Use() { // CHECK:STDOUT: declare void @_CF.Derived.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr %self) #0 !dbg !253 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr %self) #0 !dbg !245 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %self), !dbg !256 +// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %self), !dbg !248 +// CHECK:STDOUT: ret void, !dbg !248 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CUse.Main() #1 !dbg !250 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %v.var = alloca { { ptr } }, align 8, !dbg !251 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !251 +// CHECK:STDOUT: %.loc14_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !252 +// CHECK:STDOUT: %.loc14_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.2.base, i32 0, i32 0, !dbg !253 +// CHECK:STDOUT: %.loc14_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !252 +// CHECK:STDOUT: %.loc14_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.6.base, i32 0, i32 0, !dbg !252 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %v.var, ptr align 8 @Derived.val.loc14_32.5, i64 8, i1 false), !dbg !252 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc14_32.7.vptr, align 8, !dbg !252 +// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !255 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc15_3.1.base, align 8, !dbg !255 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !255 +// CHECK:STDOUT: call void %Base.F.call(ptr %.loc15_3.1.base), !dbg !255 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %v.var), !dbg !251 // CHECK:STDOUT: ret void, !dbg !256 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main() #1 !dbg !258 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #1 !dbg !257 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %v.var = alloca { { ptr } }, align 8, !dbg !259 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !259 -// CHECK:STDOUT: %.loc14_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !260 -// CHECK:STDOUT: %.loc14_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.2.base, i32 0, i32 0, !dbg !261 -// CHECK:STDOUT: %.loc14_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !260 -// CHECK:STDOUT: %.loc14_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.6.base, i32 0, i32 0, !dbg !260 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %v.var, ptr align 8 @Derived.val.loc14_32.5, i64 8, i1 false), !dbg !260 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc14_32.7.vptr, align 8, !dbg !260 -// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !263 -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc15_3.1.base, align 8, !dbg !263 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !263 -// CHECK:STDOUT: call void %Base.F.call(ptr %.loc15_3.1.base), !dbg !263 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %v.var), !dbg !259 -// CHECK:STDOUT: ret void, !dbg !264 +// CHECK:STDOUT: ret void, !dbg !259 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #1 !dbg !265 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !261 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !263 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !265 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !267 // CHECK:STDOUT: ret void, !dbg !267 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !269 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !269 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !271 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !273 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !273 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !275 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !275 // CHECK:STDOUT: ret void, !dbg !275 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !277 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !277 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !279 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !281 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !281 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !283 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !283 // CHECK:STDOUT: ret void, !dbg !283 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !285 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !285 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !287 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !289 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !289 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !291 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !291 // CHECK:STDOUT: ret void, !dbg !291 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !293 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !295 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !297 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !299 -// CHECK:STDOUT: ret void, !dbg !299 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: @@ -1049,7 +1027,7 @@ 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.dbg.cu = !{!252} +// CHECK:STDOUT: !llvm.dbg.cu = !{!244} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1059,66 +1037,66 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !251 = !DIFile(filename: "call_impl.carbon", directory: "") -// CHECK:STDOUT: !252 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !251, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !251, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !257) -// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !20) -// CHECK:STDOUT: !256 = !DILocation(line: 10, column: 3, scope: !253) -// CHECK:STDOUT: !257 = !{!254} -// CHECK:STDOUT: !258 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !251, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !252) -// CHECK:STDOUT: !259 = !DILocation(line: 14, column: 3, scope: !258) -// CHECK:STDOUT: !260 = !DILocation(line: 14, column: 21, scope: !258) -// CHECK:STDOUT: !261 = !DILocation(line: 14, column: 30, scope: !258) -// CHECK:STDOUT: !263 = !DILocation(line: 15, column: 3, scope: !258) -// CHECK:STDOUT: !264 = !DILocation(line: 13, column: 1, scope: !258) -// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !268) +// CHECK:STDOUT: !243 = !DIFile(filename: "call_impl.carbon", directory: "") +// CHECK:STDOUT: !244 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !243, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !243, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !249) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !20) +// CHECK:STDOUT: !248 = !DILocation(line: 10, column: 3, scope: !245) +// CHECK:STDOUT: !249 = !{!246} +// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !243, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !244) +// CHECK:STDOUT: !251 = !DILocation(line: 14, column: 3, scope: !250) +// CHECK:STDOUT: !252 = !DILocation(line: 14, column: 21, scope: !250) +// CHECK:STDOUT: !253 = !DILocation(line: 14, column: 30, scope: !250) +// CHECK:STDOUT: !255 = !DILocation(line: 15, column: 3, scope: !250) +// CHECK:STDOUT: !256 = !DILocation(line: 13, column: 1, scope: !250) +// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !260) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !20) +// CHECK:STDOUT: !259 = !DILocation(line: 14, column: 3, scope: !257) +// CHECK:STDOUT: !260 = !{!258} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !264) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !20) +// CHECK:STDOUT: !263 = !DILocation(line: 14, column: 3, scope: !261) +// CHECK:STDOUT: !264 = !{!262} +// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !268) // CHECK:STDOUT: !266 = !DILocalVariable(arg: 1, scope: !265, type: !20) // CHECK:STDOUT: !267 = !DILocation(line: 14, column: 3, scope: !265) // CHECK:STDOUT: !268 = !{!266} -// CHECK:STDOUT: !269 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !272) +// CHECK:STDOUT: !269 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !272) // CHECK:STDOUT: !270 = !DILocalVariable(arg: 1, scope: !269, type: !20) // CHECK:STDOUT: !271 = !DILocation(line: 14, column: 3, scope: !269) // CHECK:STDOUT: !272 = !{!270} -// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !276) +// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !276) // CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !20) // CHECK:STDOUT: !275 = !DILocation(line: 14, column: 3, scope: !273) // CHECK:STDOUT: !276 = !{!274} -// CHECK:STDOUT: !277 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !280) +// CHECK:STDOUT: !277 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !280) // CHECK:STDOUT: !278 = !DILocalVariable(arg: 1, scope: !277, type: !20) // CHECK:STDOUT: !279 = !DILocation(line: 14, column: 3, scope: !277) // CHECK:STDOUT: !280 = !{!278} -// CHECK:STDOUT: !281 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !284) +// CHECK:STDOUT: !281 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !284) // CHECK:STDOUT: !282 = !DILocalVariable(arg: 1, scope: !281, type: !20) // CHECK:STDOUT: !283 = !DILocation(line: 14, column: 3, scope: !281) // CHECK:STDOUT: !284 = !{!282} -// CHECK:STDOUT: !285 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !288) +// CHECK:STDOUT: !285 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !288) // CHECK:STDOUT: !286 = !DILocalVariable(arg: 1, scope: !285, type: !20) // CHECK:STDOUT: !287 = !DILocation(line: 14, column: 3, scope: !285) // CHECK:STDOUT: !288 = !{!286} -// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !292) +// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !243, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !292) // CHECK:STDOUT: !290 = !DILocalVariable(arg: 1, scope: !289, type: !20) // CHECK:STDOUT: !291 = !DILocation(line: 14, column: 3, scope: !289) // CHECK:STDOUT: !292 = !{!290} -// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !296) -// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !20) -// CHECK:STDOUT: !295 = !DILocation(line: 14, column: 3, scope: !293) -// CHECK:STDOUT: !296 = !{!294} -// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !251, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !252, retainedNodes: !300) -// CHECK:STDOUT: !298 = !DILocalVariable(arg: 1, scope: !297, type: !20) -// CHECK:STDOUT: !299 = !DILocation(line: 14, column: 3, scope: !297) -// CHECK:STDOUT: !300 = !{!298} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_noop.carbon' // CHECK:STDOUT: source_filename = "generic_noop.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!302} +// CHECK:STDOUT: !llvm.dbg.cu = !{!294} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !301 = !DIFile(filename: "generic_noop.carbon", directory: "") -// CHECK:STDOUT: !302 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !301, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !293 = !DIFile(filename: "generic_noop.carbon", directory: "") +// CHECK:STDOUT: !294 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !293, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_use.carbon' @@ -1130,127 +1108,120 @@ fn Use() { // CHECK:STDOUT: @Base.val.3f1.loc17_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.d7d44a05ee79f1b8" } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !305 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !297 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc16 = alloca { ptr }, align 8, !dbg !306 -// CHECK:STDOUT: %_.var.loc17 = alloca { ptr }, align 8, !dbg !309 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !306 -// CHECK:STDOUT: %.loc16_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc16, i32 0, i32 0, !dbg !307 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc16, ptr align 8 @Base.val.a7b.loc16_3, i64 8, i1 false), !dbg !306 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !309 -// CHECK:STDOUT: %.loc17_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc17, i32 0, i32 0, !dbg !310 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc17, ptr align 8 @Base.val.3f1.loc17_3, i64 8, i1 false), !dbg !309 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core"(ptr %_.var.loc17), !dbg !309 -// CHECK:STDOUT: call void @"_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %_.var.loc16), !dbg !306 -// CHECK:STDOUT: ret void, !dbg !312 +// CHECK:STDOUT: %_.var.loc16 = alloca { ptr }, align 8, !dbg !298 +// CHECK:STDOUT: %_.var.loc17 = alloca { ptr }, align 8, !dbg !301 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !298 +// CHECK:STDOUT: %.loc16_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc16, i32 0, i32 0, !dbg !299 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc16, ptr align 8 @Base.val.a7b.loc16_3, i64 8, i1 false), !dbg !298 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !301 +// CHECK:STDOUT: %.loc17_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc17, i32 0, i32 0, !dbg !302 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc17, ptr align 8 @Base.val.3f1.loc17_3, i64 8, i1 false), !dbg !301 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core"(ptr %_.var.loc17), !dbg !301 +// CHECK:STDOUT: call void @"_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %_.var.loc16), !dbg !298 +// CHECK:STDOUT: ret void, !dbg !304 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !313 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !305 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !307 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %self) #0 !dbg !309 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !311 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !313 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !315 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.13f86630f401913f:core.Destroy.Core"(ptr %self) #0 !dbg !317 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !317 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self), !dbg !319 // CHECK:STDOUT: ret void, !dbg !319 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %self) #0 !dbg !321 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !321 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.13f86630f401913f:core.Destroy.Core"(ptr %self), !dbg !323 // CHECK:STDOUT: ret void, !dbg !323 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !325 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !325 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self), !dbg !327 // CHECK:STDOUT: ret void, !dbg !327 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !329 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !329 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self), !dbg !331 // CHECK:STDOUT: ret void, !dbg !331 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !333 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !333 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !335 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !337 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !337 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self), !dbg !339 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !339 // CHECK:STDOUT: ret void, !dbg !339 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !341 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core"(ptr %self) #0 !dbg !341 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !343 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !345 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core"(ptr %self) #0 !dbg !345 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core"(ptr %self), !dbg !347 // CHECK:STDOUT: ret void, !dbg !347 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !349 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self) #0 !dbg !349 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !351 // CHECK:STDOUT: ret void, !dbg !351 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core"(ptr %self) #0 !dbg !353 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self) #0 !dbg !353 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self), !dbg !355 // CHECK:STDOUT: ret void, !dbg !355 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core"(ptr %self) #0 !dbg !357 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.2f8a0042309f394e(ptr %self) #0 !dbg !357 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core"(ptr %self), !dbg !359 -// CHECK:STDOUT: ret void, !dbg !359 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !360 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !360 +// CHECK:STDOUT: call void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %_.var), !dbg !360 +// CHECK:STDOUT: ret void, !dbg !362 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self) #0 !dbg !361 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.d7d44a05ee79f1b8(ptr %self) #0 !dbg !364 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !363 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self) #0 !dbg !365 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core"(ptr %self), !dbg !367 -// CHECK:STDOUT: ret void, !dbg !367 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.2f8a0042309f394e(ptr %self) #0 !dbg !369 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !372 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !372 -// CHECK:STDOUT: call void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %_.var), !dbg !372 -// CHECK:STDOUT: ret void, !dbg !374 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.d7d44a05ee79f1b8(ptr %self) #0 !dbg !376 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { {} }, align 1, !dbg !379 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !379 -// CHECK:STDOUT: call void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %_.var), !dbg !379 -// CHECK:STDOUT: ret void, !dbg !381 +// CHECK:STDOUT: %_.var = alloca { {} }, align 1, !dbg !367 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !367 +// CHECK:STDOUT: call void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %_.var), !dbg !367 +// CHECK:STDOUT: ret void, !dbg !369 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1266,7 +1237,7 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!304} +// CHECK:STDOUT: !llvm.dbg.cu = !{!296} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1276,80 +1247,76 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !303 = !DIFile(filename: "generic_use.carbon", directory: "") -// CHECK:STDOUT: !304 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !303, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !305 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !303, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !304) -// CHECK:STDOUT: !306 = !DILocation(line: 16, column: 3, scope: !305) -// CHECK:STDOUT: !307 = !DILocation(line: 16, column: 21, scope: !305) -// CHECK:STDOUT: !309 = !DILocation(line: 17, column: 3, scope: !305) -// CHECK:STDOUT: !310 = !DILocation(line: 17, column: 21, scope: !305) -// CHECK:STDOUT: !312 = !DILocation(line: 15, column: 1, scope: !305) -// CHECK:STDOUT: !313 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !303, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !316) +// CHECK:STDOUT: !295 = !DIFile(filename: "generic_use.carbon", directory: "") +// CHECK:STDOUT: !296 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !295, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !295, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !296) +// CHECK:STDOUT: !298 = !DILocation(line: 16, column: 3, scope: !297) +// CHECK:STDOUT: !299 = !DILocation(line: 16, column: 21, scope: !297) +// CHECK:STDOUT: !301 = !DILocation(line: 17, column: 3, scope: !297) +// CHECK:STDOUT: !302 = !DILocation(line: 17, column: 21, scope: !297) +// CHECK:STDOUT: !304 = !DILocation(line: 15, column: 1, scope: !297) +// CHECK:STDOUT: !305 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !295, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !308) +// CHECK:STDOUT: !306 = !DILocalVariable(arg: 1, scope: !305, type: !20) +// CHECK:STDOUT: !307 = !DILocation(line: 16, column: 10, scope: !305) +// CHECK:STDOUT: !308 = !{!306} +// CHECK:STDOUT: !309 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.13f86630f401913f:core.Destroy.Core", scope: null, file: !295, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !312) +// CHECK:STDOUT: !310 = !DILocalVariable(arg: 1, scope: !309, type: !20) +// CHECK:STDOUT: !311 = !DILocation(line: 16, column: 10, scope: !309) +// CHECK:STDOUT: !312 = !{!310} +// CHECK:STDOUT: !313 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !316) // CHECK:STDOUT: !314 = !DILocalVariable(arg: 1, scope: !313, type: !20) -// CHECK:STDOUT: !315 = !DILocation(line: 16, column: 10, scope: !313) +// CHECK:STDOUT: !315 = !DILocation(line: 17, column: 10, scope: !313) // CHECK:STDOUT: !316 = !{!314} -// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.13f86630f401913f:core.Destroy.Core", scope: null, file: !303, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !320) +// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !320) // CHECK:STDOUT: !318 = !DILocalVariable(arg: 1, scope: !317, type: !20) -// CHECK:STDOUT: !319 = !DILocation(line: 16, column: 10, scope: !317) +// CHECK:STDOUT: !319 = !DILocation(line: 17, column: 10, scope: !317) // CHECK:STDOUT: !320 = !{!318} -// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.13f86630f401913f:core.Destroy.Core", scope: null, file: !303, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !324) +// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !324) // CHECK:STDOUT: !322 = !DILocalVariable(arg: 1, scope: !321, type: !20) -// CHECK:STDOUT: !323 = !DILocation(line: 16, column: 10, scope: !321) +// CHECK:STDOUT: !323 = !DILocation(line: 17, column: 10, scope: !321) // CHECK:STDOUT: !324 = !{!322} -// CHECK:STDOUT: !325 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !328) +// CHECK:STDOUT: !325 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !328) // CHECK:STDOUT: !326 = !DILocalVariable(arg: 1, scope: !325, type: !20) // CHECK:STDOUT: !327 = !DILocation(line: 17, column: 10, scope: !325) // CHECK:STDOUT: !328 = !{!326} -// CHECK:STDOUT: !329 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !332) +// CHECK:STDOUT: !329 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !332) // CHECK:STDOUT: !330 = !DILocalVariable(arg: 1, scope: !329, type: !20) -// CHECK:STDOUT: !331 = !DILocation(line: 17, column: 10, scope: !329) +// CHECK:STDOUT: !331 = !DILocation(line: 17, column: 3, scope: !329) // CHECK:STDOUT: !332 = !{!330} -// CHECK:STDOUT: !333 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !336) +// CHECK:STDOUT: !333 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !336) // CHECK:STDOUT: !334 = !DILocalVariable(arg: 1, scope: !333, type: !20) -// CHECK:STDOUT: !335 = !DILocation(line: 17, column: 10, scope: !333) +// CHECK:STDOUT: !335 = !DILocation(line: 17, column: 3, scope: !333) // CHECK:STDOUT: !336 = !{!334} -// CHECK:STDOUT: !337 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !340) +// CHECK:STDOUT: !337 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !340) // CHECK:STDOUT: !338 = !DILocalVariable(arg: 1, scope: !337, type: !20) -// CHECK:STDOUT: !339 = !DILocation(line: 17, column: 10, scope: !337) +// CHECK:STDOUT: !339 = !DILocation(line: 17, column: 3, scope: !337) // CHECK:STDOUT: !340 = !{!338} -// CHECK:STDOUT: !341 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !344) +// CHECK:STDOUT: !341 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !344) // CHECK:STDOUT: !342 = !DILocalVariable(arg: 1, scope: !341, type: !20) // CHECK:STDOUT: !343 = !DILocation(line: 17, column: 3, scope: !341) // CHECK:STDOUT: !344 = !{!342} -// CHECK:STDOUT: !345 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !348) +// CHECK:STDOUT: !345 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core", scope: null, file: !295, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !348) // CHECK:STDOUT: !346 = !DILocalVariable(arg: 1, scope: !345, type: !20) // CHECK:STDOUT: !347 = !DILocation(line: 17, column: 3, scope: !345) // CHECK:STDOUT: !348 = !{!346} -// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !352) +// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core", scope: null, file: !295, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !352) // CHECK:STDOUT: !350 = !DILocalVariable(arg: 1, scope: !349, type: !20) -// CHECK:STDOUT: !351 = !DILocation(line: 17, column: 3, scope: !349) +// CHECK:STDOUT: !351 = !DILocation(line: 16, column: 3, scope: !349) // CHECK:STDOUT: !352 = !{!350} -// CHECK:STDOUT: !353 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3ce2497e05f4476:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !356) +// CHECK:STDOUT: !353 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core", scope: null, file: !295, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !356) // CHECK:STDOUT: !354 = !DILocalVariable(arg: 1, scope: !353, type: !20) -// CHECK:STDOUT: !355 = !DILocation(line: 17, column: 3, scope: !353) +// CHECK:STDOUT: !355 = !DILocation(line: 16, column: 3, scope: !353) // CHECK:STDOUT: !356 = !{!354} -// CHECK:STDOUT: !357 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3ce2497e05f4476:core.Destroy.Core", scope: null, file: !303, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !360) +// CHECK:STDOUT: !357 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.2f8a0042309f394e", scope: null, file: !295, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !363) // CHECK:STDOUT: !358 = !DILocalVariable(arg: 1, scope: !357, type: !20) -// CHECK:STDOUT: !359 = !DILocation(line: 17, column: 3, scope: !357) -// CHECK:STDOUT: !360 = !{!358} -// CHECK:STDOUT: !361 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b64fd0f098bf5c8e:core.Destroy.Core", scope: null, file: !303, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !364) -// CHECK:STDOUT: !362 = !DILocalVariable(arg: 1, scope: !361, type: !20) -// CHECK:STDOUT: !363 = !DILocation(line: 16, column: 3, scope: !361) -// CHECK:STDOUT: !364 = !{!362} -// CHECK:STDOUT: !365 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b64fd0f098bf5c8e:core.Destroy.Core", scope: null, file: !303, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !368) -// CHECK:STDOUT: !366 = !DILocalVariable(arg: 1, scope: !365, type: !20) -// CHECK:STDOUT: !367 = !DILocation(line: 16, column: 3, scope: !365) -// CHECK:STDOUT: !368 = !{!366} -// CHECK:STDOUT: !369 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.2f8a0042309f394e", scope: null, file: !303, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !375) -// CHECK:STDOUT: !370 = !DILocalVariable(arg: 1, scope: !369, type: !20) -// CHECK:STDOUT: !372 = !DILocation(line: 6, column: 5, scope: !369) -// CHECK:STDOUT: !374 = !DILocation(line: 5, column: 3, scope: !369) -// CHECK:STDOUT: !375 = !{!370} -// CHECK:STDOUT: !376 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.d7d44a05ee79f1b8", scope: null, file: !303, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !304, retainedNodes: !382) -// CHECK:STDOUT: !377 = !DILocalVariable(arg: 1, scope: !376, type: !20) -// CHECK:STDOUT: !379 = !DILocation(line: 6, column: 5, scope: !376) -// CHECK:STDOUT: !381 = !DILocation(line: 5, column: 3, scope: !376) -// CHECK:STDOUT: !382 = !{!377} +// CHECK:STDOUT: !360 = !DILocation(line: 6, column: 5, scope: !357) +// CHECK:STDOUT: !362 = !DILocation(line: 5, column: 3, scope: !357) +// CHECK:STDOUT: !363 = !{!358} +// CHECK:STDOUT: !364 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.d7d44a05ee79f1b8", scope: null, file: !295, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !296, retainedNodes: !370) +// CHECK:STDOUT: !365 = !DILocalVariable(arg: 1, scope: !364, type: !20) +// CHECK:STDOUT: !367 = !DILocation(line: 6, column: 5, scope: !364) +// CHECK:STDOUT: !369 = !DILocation(line: 5, column: 3, scope: !364) +// CHECK:STDOUT: !370 = !{!365} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_base.carbon' @@ -1358,76 +1325,76 @@ fn Use() { // CHECK:STDOUT: @"_CDerived.Main.$vtable" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.6d6a4a2512463e59 to i64), i64 ptrtoint (ptr @"_CDerived.Main.$vtable" to i64)) to i32)] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMake.Main() #0 !dbg !385 { +// CHECK:STDOUT: define void @_CMake.Main() #0 !dbg !373 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !386 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !386 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !386 -// CHECK:STDOUT: ret void, !dbg !388 +// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !374 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !374 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !374 +// CHECK:STDOUT: ret void, !dbg !376 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !389 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !377 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !379 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !381 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !383 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !385 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !387 +// CHECK:STDOUT: ret void, !dbg !387 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self) #0 !dbg !389 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !391 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !393 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self) #0 !dbg !393 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self), !dbg !395 // CHECK:STDOUT: ret void, !dbg !395 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !397 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core"(ptr %self) #0 !dbg !397 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !399 // CHECK:STDOUT: ret void, !dbg !399 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self) #0 !dbg !401 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f190654c863951f:core.Destroy.Core"(ptr %self) #0 !dbg !401 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core"(ptr %self), !dbg !403 // CHECK:STDOUT: ret void, !dbg !403 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self) #0 !dbg !405 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !405 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core"(ptr %self), !dbg !407 // CHECK:STDOUT: ret void, !dbg !407 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core"(ptr %self) #0 !dbg !409 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !409 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !411 // CHECK:STDOUT: ret void, !dbg !411 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f190654c863951f:core.Destroy.Core"(ptr %self) #0 !dbg !413 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.6d6a4a2512463e59(ptr %self) #0 !dbg !413 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core"(ptr %self), !dbg !415 -// CHECK:STDOUT: ret void, !dbg !415 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !417 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !419 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !421 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !423 -// CHECK:STDOUT: ret void, !dbg !423 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.6d6a4a2512463e59(ptr %self) #0 !dbg !425 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !428 +// CHECK:STDOUT: ret void, !dbg !416 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1436,7 +1403,7 @@ fn Use() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!384} +// CHECK:STDOUT: !llvm.dbg.cu = !{!372} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1446,51 +1413,51 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !383 = !DIFile(filename: "generic_base.carbon", directory: "") -// CHECK:STDOUT: !384 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !383, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !385 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !383, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !384) -// CHECK:STDOUT: !386 = !DILocation(line: 15, column: 3, scope: !385) -// CHECK:STDOUT: !388 = !DILocation(line: 14, column: 1, scope: !385) -// CHECK:STDOUT: !389 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !392) +// CHECK:STDOUT: !371 = !DIFile(filename: "generic_base.carbon", directory: "") +// CHECK:STDOUT: !372 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !371, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !373 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !371, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !372) +// CHECK:STDOUT: !374 = !DILocation(line: 15, column: 3, scope: !373) +// CHECK:STDOUT: !376 = !DILocation(line: 14, column: 1, scope: !373) +// CHECK:STDOUT: !377 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !380) +// CHECK:STDOUT: !378 = !DILocalVariable(arg: 1, scope: !377, type: !20) +// CHECK:STDOUT: !379 = !DILocation(line: 15, column: 3, scope: !377) +// CHECK:STDOUT: !380 = !{!378} +// CHECK:STDOUT: !381 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !384) +// CHECK:STDOUT: !382 = !DILocalVariable(arg: 1, scope: !381, type: !20) +// CHECK:STDOUT: !383 = !DILocation(line: 15, column: 3, scope: !381) +// CHECK:STDOUT: !384 = !{!382} +// CHECK:STDOUT: !385 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !388) +// CHECK:STDOUT: !386 = !DILocalVariable(arg: 1, scope: !385, type: !20) +// CHECK:STDOUT: !387 = !DILocation(line: 15, column: 3, scope: !385) +// CHECK:STDOUT: !388 = !{!386} +// CHECK:STDOUT: !389 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !392) // CHECK:STDOUT: !390 = !DILocalVariable(arg: 1, scope: !389, type: !20) // CHECK:STDOUT: !391 = !DILocation(line: 15, column: 3, scope: !389) // CHECK:STDOUT: !392 = !{!390} -// CHECK:STDOUT: !393 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !396) +// CHECK:STDOUT: !393 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5b23b4f14feb87e1:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !396) // CHECK:STDOUT: !394 = !DILocalVariable(arg: 1, scope: !393, type: !20) // CHECK:STDOUT: !395 = !DILocation(line: 15, column: 3, scope: !393) // CHECK:STDOUT: !396 = !{!394} -// CHECK:STDOUT: !397 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !400) +// CHECK:STDOUT: !397 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !400) // CHECK:STDOUT: !398 = !DILocalVariable(arg: 1, scope: !397, type: !20) // CHECK:STDOUT: !399 = !DILocation(line: 15, column: 3, scope: !397) // CHECK:STDOUT: !400 = !{!398} -// CHECK:STDOUT: !401 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5b23b4f14feb87e1:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !404) +// CHECK:STDOUT: !401 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f190654c863951f:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !404) // CHECK:STDOUT: !402 = !DILocalVariable(arg: 1, scope: !401, type: !20) // CHECK:STDOUT: !403 = !DILocation(line: 15, column: 3, scope: !401) // CHECK:STDOUT: !404 = !{!402} -// CHECK:STDOUT: !405 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5b23b4f14feb87e1:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !408) +// CHECK:STDOUT: !405 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !408) // CHECK:STDOUT: !406 = !DILocalVariable(arg: 1, scope: !405, type: !20) // CHECK:STDOUT: !407 = !DILocation(line: 15, column: 3, scope: !405) // CHECK:STDOUT: !408 = !{!406} -// CHECK:STDOUT: !409 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f190654c863951f:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !412) +// CHECK:STDOUT: !409 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !371, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !412) // CHECK:STDOUT: !410 = !DILocalVariable(arg: 1, scope: !409, type: !20) // CHECK:STDOUT: !411 = !DILocation(line: 15, column: 3, scope: !409) // CHECK:STDOUT: !412 = !{!410} -// CHECK:STDOUT: !413 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f190654c863951f:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !416) +// CHECK:STDOUT: !413 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !371, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !372, retainedNodes: !417) // CHECK:STDOUT: !414 = !DILocalVariable(arg: 1, scope: !413, type: !20) -// CHECK:STDOUT: !415 = !DILocation(line: 15, column: 3, scope: !413) -// CHECK:STDOUT: !416 = !{!414} -// CHECK:STDOUT: !417 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !420) -// CHECK:STDOUT: !418 = !DILocalVariable(arg: 1, scope: !417, type: !20) -// CHECK:STDOUT: !419 = !DILocation(line: 15, column: 3, scope: !417) -// CHECK:STDOUT: !420 = !{!418} -// CHECK:STDOUT: !421 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !383, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !424) -// CHECK:STDOUT: !422 = !DILocalVariable(arg: 1, scope: !421, type: !20) -// CHECK:STDOUT: !423 = !DILocation(line: 15, column: 3, scope: !421) -// CHECK:STDOUT: !424 = !{!422} -// CHECK:STDOUT: !425 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !383, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !384, retainedNodes: !429) -// CHECK:STDOUT: !426 = !DILocalVariable(arg: 1, scope: !425, type: !20) -// CHECK:STDOUT: !428 = !DILocation(line: 5, column: 3, scope: !425) -// CHECK:STDOUT: !429 = !{!426} +// CHECK:STDOUT: !416 = !DILocation(line: 5, column: 3, scope: !413) +// CHECK:STDOUT: !417 = !{!414} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunk.carbon' @@ -1507,142 +1474,128 @@ fn Use() { // CHECK:STDOUT: declare void @_CF.Base.Main(ptr sret({}), ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Derived.Main(ptr sret({}) %return, ptr %self, ptr %n) #0 !dbg !436 { +// CHECK:STDOUT: define void @_CF.Derived.Main(ptr sret({}) %return, ptr %self, ptr %n) #0 !dbg !424 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @From.val.loc18_14, i64 0, i1 false), !dbg !443 -// CHECK:STDOUT: ret void, !dbg !443 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @From.val.loc18_14, i64 0, i1 false), !dbg !431 +// CHECK:STDOUT: ret void, !dbg !431 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr sret({}) %return, ptr %self, ptr %n) #1 !dbg !445 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr sret({}) %return, ptr %self, ptr %n) #1 !dbg !433 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc17_52.2.temp = alloca {}, align 1, !dbg !437 +// CHECK:STDOUT: %.5.temp = alloca {}, align 1, !dbg !436 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.2.temp), !dbg !437 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.5.temp), !dbg !436 +// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %.5.temp, ptr %n), !dbg !436 +// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %.loc17_52.2.temp, ptr %self, ptr %.5.temp), !dbg !437 +// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %return, ptr %.loc17_52.2.temp), !dbg !437 +// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr %.loc17_52.2.temp), !dbg !437 +// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.5.temp), !dbg !436 +// CHECK:STDOUT: ret void, !dbg !437 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !439 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !441 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr %self) #0 !dbg !443 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !445 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %self) #0 !dbg !447 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_52.2.temp = alloca {}, align 1, !dbg !449 -// CHECK:STDOUT: %.5.temp = alloca {}, align 1, !dbg !448 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.2.temp), !dbg !449 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.5.temp), !dbg !448 -// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %.5.temp, ptr %n), !dbg !448 -// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %.loc17_52.2.temp, ptr %self, ptr %.5.temp), !dbg !449 -// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %return, ptr %.loc17_52.2.temp), !dbg !449 -// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr %.loc17_52.2.temp), !dbg !449 -// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.5.temp), !dbg !448 // CHECK:STDOUT: ret void, !dbg !449 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !451 { +// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !451 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !453 +// CHECK:STDOUT: %d.var = alloca { { ptr } }, align 8, !dbg !452 +// CHECK:STDOUT: %.loc25_10.1.temp = alloca {}, align 1, !dbg !460 +// CHECK:STDOUT: %.loc25_9.2.temp = alloca {}, align 1, !dbg !461 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !452 +// CHECK:STDOUT: %.loc23_31.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !453 +// CHECK:STDOUT: %.loc23_30.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.2.base, i32 0, i32 0, !dbg !454 +// CHECK:STDOUT: %.loc23_31.6.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !453 +// CHECK:STDOUT: %.loc23_31.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.6.base, i32 0, i32 0, !dbg !453 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %d.var, ptr align 8 @Derived.val.loc23_31.5, i64 8, i1 false), !dbg !453 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc23_31.7.vptr, align 8, !dbg !453 +// CHECK:STDOUT: %.loc24_18.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !457 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_10.1.temp), !dbg !460 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_9.2.temp), !dbg !461 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc25_10.1.temp, align 8, !dbg !460 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !460 +// CHECK:STDOUT: call void %Base.F.call(ptr %.loc25_10.1.temp, ptr %.loc24_18.2.base, ptr @From.val.loc18_14), !dbg !460 +// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.loc25_10.1.temp), !dbg !460 +// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr @From.val), !dbg !461 +// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !452 +// CHECK:STDOUT: ret void, !dbg !462 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c2a743abd057cb33:core.Destroy.Core"(ptr %self) #0 !dbg !455 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !457 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr %self) #0 !dbg !459 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c2a743abd057cb33:core.Destroy.Core"(ptr %self), !dbg !461 -// CHECK:STDOUT: ret void, !dbg !461 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %self) #0 !dbg !463 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !463 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !465 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %self) #0 !dbg !467 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !467 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %self), !dbg !469 // CHECK:STDOUT: ret void, !dbg !469 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !471 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !471 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %d.var = alloca { { ptr } }, align 8, !dbg !472 -// CHECK:STDOUT: %.loc25_10.1.temp = alloca {}, align 1, !dbg !480 -// CHECK:STDOUT: %.loc25_9.2.temp = alloca {}, align 1, !dbg !481 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !472 -// CHECK:STDOUT: %.loc23_31.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !473 -// CHECK:STDOUT: %.loc23_30.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.2.base, i32 0, i32 0, !dbg !474 -// CHECK:STDOUT: %.loc23_31.6.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !473 -// CHECK:STDOUT: %.loc23_31.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.6.base, i32 0, i32 0, !dbg !473 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %d.var, ptr align 8 @Derived.val.loc23_31.5, i64 8, i1 false), !dbg !473 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc23_31.7.vptr, align 8, !dbg !473 -// CHECK:STDOUT: %.loc24_18.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !477 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_10.1.temp), !dbg !480 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_9.2.temp), !dbg !481 -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc25_10.1.temp, align 8, !dbg !480 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !480 -// CHECK:STDOUT: call void %Base.F.call(ptr %.loc25_10.1.temp, ptr %.loc24_18.2.base, ptr @From.val.loc18_14), !dbg !480 -// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.loc25_10.1.temp), !dbg !480 -// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr @From.val), !dbg !481 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !472 -// CHECK:STDOUT: ret void, !dbg !482 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !473 +// CHECK:STDOUT: ret void, !dbg !473 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !483 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !475 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !477 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !479 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !481 +// CHECK:STDOUT: ret void, !dbg !481 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !483 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !485 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !487 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !487 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !489 // CHECK:STDOUT: ret void, !dbg !489 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !491 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !491 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !493 // CHECK:STDOUT: ret void, !dbg !493 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !495 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !495 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !497 // CHECK:STDOUT: ret void, !dbg !497 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !499 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !501 -// CHECK:STDOUT: ret void, !dbg !501 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !503 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !505 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !507 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !509 -// CHECK:STDOUT: ret void, !dbg !509 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !511 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !513 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !515 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !517 -// CHECK:STDOUT: ret void, !dbg !517 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #2 // CHECK:STDOUT: @@ -1661,7 +1614,7 @@ 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.dbg.cu = !{!431} +// CHECK:STDOUT: !llvm.dbg.cu = !{!419} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1671,83 +1624,75 @@ fn Use() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !430 = !DIFile(filename: "thunk.carbon", directory: "") -// CHECK:STDOUT: !431 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !430, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !434 = !{!20, !20, !20} -// CHECK:STDOUT: !435 = !DISubroutineType(types: !434) -// CHECK:STDOUT: !436 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !430, line: 17, type: !435, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !444) -// CHECK:STDOUT: !437 = !DILocalVariable(arg: 1, scope: !436, type: !20) -// CHECK:STDOUT: !438 = !DILocalVariable(arg: 2, scope: !436, type: !20) -// CHECK:STDOUT: !443 = !DILocation(line: 18, column: 5, scope: !436) -// CHECK:STDOUT: !444 = !{!437, !438} -// CHECK:STDOUT: !445 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !430, line: 17, type: !435, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !450) -// CHECK:STDOUT: !446 = !DILocalVariable(arg: 1, scope: !445, type: !20) -// CHECK:STDOUT: !447 = !DILocalVariable(arg: 2, scope: !445, type: !20) -// CHECK:STDOUT: !448 = !DILocation(line: 0, scope: !445) -// CHECK:STDOUT: !449 = !DILocation(line: 17, column: 3, scope: !445) -// CHECK:STDOUT: !450 = !{!446, !447} -// CHECK:STDOUT: !451 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !430, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !454) -// CHECK:STDOUT: !452 = !DILocalVariable(arg: 1, scope: !451, type: !20) -// CHECK:STDOUT: !453 = !DILocation(line: 17, column: 3, scope: !451) -// CHECK:STDOUT: !454 = !{!452} -// CHECK:STDOUT: !455 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c2a743abd057cb33:core.Destroy.Core", scope: null, file: !430, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !458) -// CHECK:STDOUT: !456 = !DILocalVariable(arg: 1, scope: !455, type: !20) -// CHECK:STDOUT: !457 = !DILocation(line: 17, column: 3, scope: !455) -// CHECK:STDOUT: !458 = !{!456} -// CHECK:STDOUT: !459 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core", scope: null, file: !430, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !462) -// CHECK:STDOUT: !460 = !DILocalVariable(arg: 1, scope: !459, type: !20) -// CHECK:STDOUT: !461 = !DILocation(line: 17, column: 3, scope: !459) -// CHECK:STDOUT: !462 = !{!460} -// CHECK:STDOUT: !463 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7ef2e8c2f12d163a:core.Destroy.Core", scope: null, file: !430, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !466) +// CHECK:STDOUT: !418 = !DIFile(filename: "thunk.carbon", directory: "") +// CHECK:STDOUT: !419 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !418, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !422 = !{!20, !20, !20} +// CHECK:STDOUT: !423 = !DISubroutineType(types: !422) +// CHECK:STDOUT: !424 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !418, line: 17, type: !423, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !432) +// CHECK:STDOUT: !425 = !DILocalVariable(arg: 1, scope: !424, type: !20) +// CHECK:STDOUT: !426 = !DILocalVariable(arg: 2, scope: !424, type: !20) +// CHECK:STDOUT: !431 = !DILocation(line: 18, column: 5, scope: !424) +// CHECK:STDOUT: !432 = !{!425, !426} +// CHECK:STDOUT: !433 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !418, line: 17, type: !423, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !438) +// CHECK:STDOUT: !434 = !DILocalVariable(arg: 1, scope: !433, type: !20) +// CHECK:STDOUT: !435 = !DILocalVariable(arg: 2, scope: !433, type: !20) +// CHECK:STDOUT: !436 = !DILocation(line: 0, scope: !433) +// CHECK:STDOUT: !437 = !DILocation(line: 17, column: 3, scope: !433) +// CHECK:STDOUT: !438 = !{!434, !435} +// CHECK:STDOUT: !439 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !418, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !442) +// CHECK:STDOUT: !440 = !DILocalVariable(arg: 1, scope: !439, type: !20) +// CHECK:STDOUT: !441 = !DILocation(line: 17, column: 3, scope: !439) +// CHECK:STDOUT: !442 = !{!440} +// CHECK:STDOUT: !443 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core", scope: null, file: !418, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !446) +// CHECK:STDOUT: !444 = !DILocalVariable(arg: 1, scope: !443, type: !20) +// CHECK:STDOUT: !445 = !DILocation(line: 17, column: 3, scope: !443) +// CHECK:STDOUT: !446 = !{!444} +// CHECK:STDOUT: !447 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core", scope: null, file: !418, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !450) +// CHECK:STDOUT: !448 = !DILocalVariable(arg: 1, scope: !447, type: !20) +// CHECK:STDOUT: !449 = !DILocation(line: 0, scope: !447) +// CHECK:STDOUT: !450 = !{!448} +// CHECK:STDOUT: !451 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !418, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !419) +// CHECK:STDOUT: !452 = !DILocation(line: 23, column: 3, scope: !451) +// CHECK:STDOUT: !453 = !DILocation(line: 23, column: 20, scope: !451) +// CHECK:STDOUT: !454 = !DILocation(line: 23, column: 29, scope: !451) +// CHECK:STDOUT: !457 = !DILocation(line: 24, column: 18, scope: !451) +// CHECK:STDOUT: !460 = !DILocation(line: 25, column: 3, scope: !451) +// CHECK:STDOUT: !461 = !DILocation(line: 25, column: 8, scope: !451) +// CHECK:STDOUT: !462 = !DILocation(line: 22, column: 1, scope: !451) +// CHECK:STDOUT: !463 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !466) // CHECK:STDOUT: !464 = !DILocalVariable(arg: 1, scope: !463, type: !20) -// CHECK:STDOUT: !465 = !DILocation(line: 0, scope: !463) +// CHECK:STDOUT: !465 = !DILocation(line: 23, column: 3, scope: !463) // CHECK:STDOUT: !466 = !{!464} -// CHECK:STDOUT: !467 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core", scope: null, file: !430, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !470) +// CHECK:STDOUT: !467 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !470) // CHECK:STDOUT: !468 = !DILocalVariable(arg: 1, scope: !467, type: !20) -// CHECK:STDOUT: !469 = !DILocation(line: 0, scope: !467) +// CHECK:STDOUT: !469 = !DILocation(line: 23, column: 3, scope: !467) // CHECK:STDOUT: !470 = !{!468} -// CHECK:STDOUT: !471 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !430, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !431) -// CHECK:STDOUT: !472 = !DILocation(line: 23, column: 3, scope: !471) -// CHECK:STDOUT: !473 = !DILocation(line: 23, column: 20, scope: !471) -// CHECK:STDOUT: !474 = !DILocation(line: 23, column: 29, scope: !471) -// CHECK:STDOUT: !477 = !DILocation(line: 24, column: 18, scope: !471) -// CHECK:STDOUT: !480 = !DILocation(line: 25, column: 3, scope: !471) -// CHECK:STDOUT: !481 = !DILocation(line: 25, column: 8, scope: !471) -// CHECK:STDOUT: !482 = !DILocation(line: 22, column: 1, scope: !471) -// CHECK:STDOUT: !483 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !486) +// CHECK:STDOUT: !471 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !474) +// CHECK:STDOUT: !472 = !DILocalVariable(arg: 1, scope: !471, type: !20) +// CHECK:STDOUT: !473 = !DILocation(line: 23, column: 3, scope: !471) +// CHECK:STDOUT: !474 = !{!472} +// CHECK:STDOUT: !475 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !478) +// CHECK:STDOUT: !476 = !DILocalVariable(arg: 1, scope: !475, type: !20) +// CHECK:STDOUT: !477 = !DILocation(line: 23, column: 3, scope: !475) +// CHECK:STDOUT: !478 = !{!476} +// CHECK:STDOUT: !479 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !482) +// CHECK:STDOUT: !480 = !DILocalVariable(arg: 1, scope: !479, type: !20) +// CHECK:STDOUT: !481 = !DILocation(line: 23, column: 3, scope: !479) +// CHECK:STDOUT: !482 = !{!480} +// CHECK:STDOUT: !483 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !486) // CHECK:STDOUT: !484 = !DILocalVariable(arg: 1, scope: !483, type: !20) // CHECK:STDOUT: !485 = !DILocation(line: 23, column: 3, scope: !483) // CHECK:STDOUT: !486 = !{!484} -// CHECK:STDOUT: !487 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !490) +// CHECK:STDOUT: !487 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !490) // CHECK:STDOUT: !488 = !DILocalVariable(arg: 1, scope: !487, type: !20) // CHECK:STDOUT: !489 = !DILocation(line: 23, column: 3, scope: !487) // CHECK:STDOUT: !490 = !{!488} -// CHECK:STDOUT: !491 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !494) +// CHECK:STDOUT: !491 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !494) // CHECK:STDOUT: !492 = !DILocalVariable(arg: 1, scope: !491, type: !20) // CHECK:STDOUT: !493 = !DILocation(line: 23, column: 3, scope: !491) // CHECK:STDOUT: !494 = !{!492} -// CHECK:STDOUT: !495 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !498) +// CHECK:STDOUT: !495 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !418, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !419, retainedNodes: !498) // CHECK:STDOUT: !496 = !DILocalVariable(arg: 1, scope: !495, type: !20) // CHECK:STDOUT: !497 = !DILocation(line: 23, column: 3, scope: !495) // CHECK:STDOUT: !498 = !{!496} -// CHECK:STDOUT: !499 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !502) -// CHECK:STDOUT: !500 = !DILocalVariable(arg: 1, scope: !499, type: !20) -// CHECK:STDOUT: !501 = !DILocation(line: 23, column: 3, scope: !499) -// CHECK:STDOUT: !502 = !{!500} -// CHECK:STDOUT: !503 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !506) -// CHECK:STDOUT: !504 = !DILocalVariable(arg: 1, scope: !503, type: !20) -// CHECK:STDOUT: !505 = !DILocation(line: 23, column: 3, scope: !503) -// CHECK:STDOUT: !506 = !{!504} -// CHECK:STDOUT: !507 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !510) -// CHECK:STDOUT: !508 = !DILocalVariable(arg: 1, scope: !507, type: !20) -// CHECK:STDOUT: !509 = !DILocation(line: 23, column: 3, scope: !507) -// CHECK:STDOUT: !510 = !{!508} -// CHECK:STDOUT: !511 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !514) -// CHECK:STDOUT: !512 = !DILocalVariable(arg: 1, scope: !511, type: !20) -// CHECK:STDOUT: !513 = !DILocation(line: 23, column: 3, scope: !511) -// CHECK:STDOUT: !514 = !{!512} -// CHECK:STDOUT: !515 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !430, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !431, retainedNodes: !518) -// CHECK:STDOUT: !516 = !DILocalVariable(arg: 1, scope: !515, type: !20) -// CHECK:STDOUT: !517 = !DILocation(line: 23, column: 3, scope: !515) -// CHECK:STDOUT: !518 = !{!516} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/bindings.carbon b/toolchain/lower/testdata/for/bindings.carbon index 15f9164562d3..05eb3bd7f5a1 100644 --- a/toolchain/lower/testdata/for/bindings.carbon +++ b/toolchain/lower/testdata/for/bindings.carbon @@ -95,115 +95,87 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !49 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !53 // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a69fcb7116d040b0:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core"(ptr %self), !dbg !65 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a69fcb7116d040b0:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a69fcb7116d040b0:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a69fcb7116d040b0:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.47c342be31d1679f:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.47c342be31d1679f:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b61f4dca88958e98:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core"(ptr %self), !dbg !85 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core"(ptr %self), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e1dbefa6145042b5:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b61f4dca88958e98:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454683f3b8639b20:core.Destroy.Core"(ptr %self) #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core"(ptr %self), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e1dbefa6145042b5:core.Destroy.Core"(ptr %self) #0 !dbg !95 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !97 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e1dbefa6145042b5:core.Destroy.Core"(ptr %self) #0 !dbg !99 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e1dbefa6145042b5:core.Destroy.Core"(ptr %self), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.454683f3b8639b20:core.Destroy.Core"(ptr %self) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !105 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454683f3b8639b20:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.454683f3b8639b20:core.Destroy.Core"(ptr %self), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -211,69 +183,69 @@ fn For() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3"(ptr %self) #0 !dbg !111 { +// CHECK:STDOUT: define linkonce_odr void @"_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3"(ptr sret(<{ { i32, i32 }, i1 }>) %return, ptr %self, ptr %_) #0 !dbg !118 { +// CHECK:STDOUT: define linkonce_odr void @"_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3"(ptr sret(<{ { i32, i32 }, i1 }>) %return, ptr %self, ptr %_) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CNone.Optional.Core.b20cf0d1c9daa8c2(ptr %return), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: call void @_CNone.Optional.Core.b20cf0d1c9daa8c2(ptr %return), !dbg !109 +// CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.b20cf0d1c9daa8c2(ptr %self) #0 !dbg !131 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %self), !dbg !137 -// CHECK:STDOUT: ret i1 %1, !dbg !138 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.b20cf0d1c9daa8c2(ptr %self) #0 !dbg !115 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %self), !dbg !121 +// CHECK:STDOUT: ret i1 %1, !dbg !122 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGet.Optional.Core.b20cf0d1c9daa8c2(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !140 { -// CHECK:STDOUT: call void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %return, ptr %self), !dbg !146 -// CHECK:STDOUT: ret void, !dbg !147 +// CHECK:STDOUT: define linkonce_odr void @_CGet.Optional.Core.b20cf0d1c9daa8c2(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !124 { +// CHECK:STDOUT: call void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %return, ptr %self), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.b20cf0d1c9daa8c2(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !149 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %return), !dbg !152 -// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.b20cf0d1c9daa8c2(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !133 { +// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %return), !dbg !136 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %value) #0 !dbg !154 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 1, !dbg !159 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !159 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !159 -// CHECK:STDOUT: ret i1 %2, !dbg !160 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr %value) #0 !dbg !138 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 1, !dbg !143 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !143 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !143 +// CHECK:STDOUT: ret i1 %2, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr sret({ i32, i32 }) %return, ptr %value) #0 !dbg !162 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 0, !dbg !167 -// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %return, ptr %value1), !dbg !167 -// CHECK:STDOUT: ret void, !dbg !168 +// CHECK:STDOUT: define linkonce_odr void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr sret({ i32, i32 }) %return, ptr %value) #0 !dbg !146 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 0, !dbg !151 +// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr %return, ptr %value1), !dbg !151 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !170 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %return, i32 0, i32 1, !dbg !177 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !177 -// CHECK:STDOUT: ret void, !dbg !178 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3"(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !154 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %return, i32 0, i32 1, !dbg !161 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !161 +// CHECK:STDOUT: ret void, !dbg !162 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !180 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !185 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !185 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !186 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !187 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !187 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !186 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !186 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !186 -// CHECK:STDOUT: ret void, !dbg !188 +// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !164 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !169 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !169 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !170 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !171 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !171 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !170 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !170 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !170 +// CHECK:STDOUT: ret void, !dbg !172 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -318,119 +290,103 @@ fn For() { // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !6) // CHECK:STDOUT: !41 = !DILocation(line: 27, column: 10, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !6) // CHECK:STDOUT: !45 = !DILocation(line: 27, column: 10, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !6) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !7) // CHECK:STDOUT: !49 = !DILocation(line: 27, column: 10, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) // CHECK:STDOUT: !53 = !DILocation(line: 27, column: 10, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !7) -// CHECK:STDOUT: !57 = !DILocation(line: 27, column: 10, scope: !55) +// CHECK:STDOUT: !57 = !DILocation(line: 29, column: 7, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6b9c90d9dd82cebb:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b9c90d9dd82cebb:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !7) // CHECK:STDOUT: !61 = !DILocation(line: 29, column: 7, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b9c90d9dd82cebb:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a69fcb7116d040b0:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !7) // CHECK:STDOUT: !65 = !DILocation(line: 29, column: 7, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a69fcb7116d040b0:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !7) // CHECK:STDOUT: !69 = !DILocation(line: 29, column: 7, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a69fcb7116d040b0:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !7) // CHECK:STDOUT: !73 = !DILocation(line: 29, column: 7, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.47c342be31d1679f:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !7) // CHECK:STDOUT: !77 = !DILocation(line: 29, column: 7, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.47c342be31d1679f:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !7) // CHECK:STDOUT: !81 = !DILocation(line: 29, column: 7, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.47c342be31d1679f:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b61f4dca88958e98:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !7) // CHECK:STDOUT: !85 = !DILocation(line: 29, column: 7, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b61f4dca88958e98:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e1dbefa6145042b5:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !7) // CHECK:STDOUT: !89 = !DILocation(line: 29, column: 7, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b61f4dca88958e98:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454683f3b8639b20:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !94) // CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !7) -// CHECK:STDOUT: !93 = !DILocation(line: 29, column: 7, scope: !91) +// CHECK:STDOUT: !93 = !DILocation(line: 27, column: 3, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e1dbefa6145042b5:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !98) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !101) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !7) -// CHECK:STDOUT: !97 = !DILocation(line: 29, column: 7, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e1dbefa6145042b5:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !7) -// CHECK:STDOUT: !101 = !DILocation(line: 29, column: 7, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.454683f3b8639b20:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !7) -// CHECK:STDOUT: !105 = !DILocation(line: 27, column: 3, scope: !103) -// CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454683f3b8639b20:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !7) -// CHECK:STDOUT: !109 = !DILocation(line: 27, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !117) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !7) -// CHECK:STDOUT: !116 = !DILocation(line: 16, column: 7, scope: !111) -// CHECK:STDOUT: !117 = !{!112} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3", scope: null, file: !4, line: 18, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !7) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 2, scope: !118, type: !7) -// CHECK:STDOUT: !125 = !DILocation(line: 19, column: 14, scope: !118) -// CHECK:STDOUT: !126 = !{!7} -// CHECK:STDOUT: !127 = !DISubroutineType(types: !126) -// CHECK:STDOUT: !128 = !DILocation(line: 19, column: 7, scope: !118) -// CHECK:STDOUT: !129 = !{!119, !120} -// CHECK:STDOUT: !130 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !130, line: 36, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !7) -// CHECK:STDOUT: !137 = !DILocation(line: 37, column: 12, scope: !131) -// CHECK:STDOUT: !138 = !DILocation(line: 37, column: 5, scope: !131) -// CHECK:STDOUT: !139 = !{!132} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !130, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !7) -// CHECK:STDOUT: !146 = !DILocation(line: 40, column: 12, scope: !140) -// CHECK:STDOUT: !147 = !DILocation(line: 40, column: 5, scope: !140) -// CHECK:STDOUT: !148 = !{!141} -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !130, line: 30, type: !127, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !152 = !DILocation(line: 31, column: 12, scope: !149) -// CHECK:STDOUT: !153 = !DILocation(line: 31, column: 5, scope: !149) -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !130, line: 141, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) -// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !7) -// CHECK:STDOUT: !159 = !DILocation(line: 142, column: 12, scope: !154) -// CHECK:STDOUT: !160 = !DILocation(line: 142, column: 5, scope: !154) -// CHECK:STDOUT: !161 = !{!155} -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !130, line: 144, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !7) -// CHECK:STDOUT: !167 = !DILocation(line: 145, column: 12, scope: !162) -// CHECK:STDOUT: !168 = !DILocation(line: 145, column: 5, scope: !162) -// CHECK:STDOUT: !169 = !{!163} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !130, line: 125, type: !127, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !177 = !DILocation(line: 128, column: 5, scope: !170) -// CHECK:STDOUT: !178 = !DILocation(line: 129, column: 5, scope: !170) -// CHECK:STDOUT: !179 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") -// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb", scope: null, file: !179, line: 62, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !189) -// CHECK:STDOUT: !181 = !DILocalVariable(arg: 1, scope: !180, type: !7) -// CHECK:STDOUT: !185 = !DILocation(line: 63, column: 13, scope: !180) -// CHECK:STDOUT: !186 = !DILocation(line: 63, column: 12, scope: !180) -// CHECK:STDOUT: !187 = !DILocation(line: 63, column: 26, scope: !180) -// CHECK:STDOUT: !188 = !DILocation(line: 63, column: 5, scope: !180) -// CHECK:STDOUT: !189 = !{!181} +// CHECK:STDOUT: !100 = !DILocation(line: 16, column: 7, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.2e30d2d7a87a6cd3", scope: null, file: !4, line: 18, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !113) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !7) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 2, scope: !102, type: !7) +// CHECK:STDOUT: !109 = !DILocation(line: 19, column: 14, scope: !102) +// CHECK:STDOUT: !110 = !{!7} +// CHECK:STDOUT: !111 = !DISubroutineType(types: !110) +// CHECK:STDOUT: !112 = !DILocation(line: 19, column: 7, scope: !102) +// CHECK:STDOUT: !113 = !{!103, !104} +// CHECK:STDOUT: !114 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !114, line: 36, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !123) +// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !7) +// CHECK:STDOUT: !121 = !DILocation(line: 37, column: 12, scope: !115) +// CHECK:STDOUT: !122 = !DILocation(line: 37, column: 5, scope: !115) +// CHECK:STDOUT: !123 = !{!116} +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !114, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !7) +// CHECK:STDOUT: !130 = !DILocation(line: 40, column: 12, scope: !124) +// CHECK:STDOUT: !131 = !DILocation(line: 40, column: 5, scope: !124) +// CHECK:STDOUT: !132 = !{!125} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.b20cf0d1c9daa8c2", scope: null, file: !114, line: 30, type: !111, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !136 = !DILocation(line: 31, column: 12, scope: !133) +// CHECK:STDOUT: !137 = !DILocation(line: 31, column: 5, scope: !133) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !114, line: 141, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !145) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !7) +// CHECK:STDOUT: !143 = !DILocation(line: 142, column: 12, scope: !138) +// CHECK:STDOUT: !144 = !DILocation(line: 142, column: 5, scope: !138) +// CHECK:STDOUT: !145 = !{!139} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !114, line: 144, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !153) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !7) +// CHECK:STDOUT: !151 = !DILocation(line: 145, column: 12, scope: !146) +// CHECK:STDOUT: !152 = !DILocation(line: 145, column: 5, scope: !146) +// CHECK:STDOUT: !153 = !{!147} +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.2e30d2d7a87a6cd3", scope: null, file: !114, line: 125, type: !111, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !161 = !DILocation(line: 128, column: 5, scope: !154) +// CHECK:STDOUT: !162 = !DILocation(line: 129, column: 5, scope: !154) +// CHECK:STDOUT: !163 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.8608f3c6f62d80cb", scope: null, file: !163, line: 62, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !173) +// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !7) +// CHECK:STDOUT: !169 = !DILocation(line: 63, column: 13, scope: !164) +// CHECK:STDOUT: !170 = !DILocation(line: 63, column: 12, scope: !164) +// CHECK:STDOUT: !171 = !DILocation(line: 63, column: 26, scope: !164) +// CHECK:STDOUT: !172 = !DILocation(line: 63, column: 5, scope: !164) +// CHECK:STDOUT: !173 = !{!165} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/break_continue.carbon b/toolchain/lower/testdata/for/break_continue.carbon index 8dd7fb58da76..83b3dc4bd7c0 100644 --- a/toolchain/lower/testdata/for/break_continue.carbon +++ b/toolchain/lower/testdata/for/break_continue.carbon @@ -83,8 +83,6 @@ fn For() { // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !38 { // CHECK:STDOUT: entry: @@ -105,205 +103,191 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self), !dbg !56 // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !64 // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !72 // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !76 // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !78 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !82 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self), !dbg !84 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self), !dbg !84 // CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !86 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !86 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !90 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self), !dbg !92 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self), !dbg !92 // CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !94 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !96 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !100 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !104 { -// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !109 -// CHECK:STDOUT: ret i32 %1, !dbg !110 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !96 { +// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !101 +// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !101 +// CHECK:STDOUT: ret i32 %1, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !112 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !119 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !119 -// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !121 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !119 -// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !124 -// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !124 -// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !123 -// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !123 -// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !125 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !104 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !111 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !111 +// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !113 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !111 +// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !116 +// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !116 +// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !115 +// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !115 +// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !117 // CHECK:STDOUT: // CHECK:STDOUT: 6: ; preds = %0 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !128 -// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !129 -// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %7), !dbg !130 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !119 -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !120 +// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !121 +// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %7), !dbg !122 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !111 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !132 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !119 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !124 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !111 +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !136 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !142 -// CHECK:STDOUT: ret i1 %1, !dbg !143 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !128 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !134 +// CHECK:STDOUT: ret i1 %1, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !145 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !151 -// CHECK:STDOUT: ret i32 %1, !dbg !152 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !137 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !143 +// CHECK:STDOUT: ret i32 %1, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CInclusiveRange.Core(ptr sret({ i32, i32 }), i32, i32) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !155 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !158 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !147 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !150 +// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !155 { +// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !160 // CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !163 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !168 -// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !163 { +// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !166 +// CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !171 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !174 -// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !168 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !173 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !173 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !173 +// CHECK:STDOUT: ret i1 %2, !dbg !174 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !176 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !181 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !181 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !181 -// CHECK:STDOUT: ret i1 %2, !dbg !182 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !184 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !189 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !189 -// CHECK:STDOUT: ret i32 %1, !dbg !190 +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !176 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !181 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !181 +// CHECK:STDOUT: ret i32 %1, !dbg !182 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !192 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !195 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !196 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !196 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !196 -// CHECK:STDOUT: ret void, !dbg !196 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !184 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !187 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !188 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !188 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !188 +// CHECK:STDOUT: ret void, !dbg !188 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !200 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !209 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !209 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !211 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !211 -// CHECK:STDOUT: ret void, !dbg !212 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !192 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !201 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !201 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !203 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !203 +// CHECK:STDOUT: ret void, !dbg !204 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !214 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !221 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !221 -// CHECK:STDOUT: ret void, !dbg !222 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !206 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !213 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !213 +// CHECK:STDOUT: ret void, !dbg !214 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !223 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !228 -// CHECK:STDOUT: ret i32 %1, !dbg !230 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !215 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !220 +// CHECK:STDOUT: ret i32 %1, !dbg !222 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !232 { -// CHECK:STDOUT: ret i32 %self, !dbg !238 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !224 { +// CHECK:STDOUT: ret i32 %self, !dbg !230 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -364,139 +348,131 @@ fn For() { // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !7) // CHECK:STDOUT: !48 = !DILocation(line: 18, column: 7, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !6) // CHECK:STDOUT: !52 = !DILocation(line: 18, column: 7, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !6) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !7) // CHECK:STDOUT: !56 = !DILocation(line: 18, column: 7, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !7) // CHECK:STDOUT: !60 = !DILocation(line: 18, column: 7, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !7) // CHECK:STDOUT: !64 = !DILocation(line: 18, column: 7, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !7) // CHECK:STDOUT: !68 = !DILocation(line: 18, column: 7, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !7) // CHECK:STDOUT: !72 = !DILocation(line: 18, column: 7, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !7) // CHECK:STDOUT: !76 = !DILocation(line: 18, column: 7, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !7) -// CHECK:STDOUT: !80 = !DILocation(line: 18, column: 7, scope: !78) +// CHECK:STDOUT: !80 = !DILocation(line: 18, column: 18, scope: !78) // CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !7) -// CHECK:STDOUT: !84 = !DILocation(line: 18, column: 7, scope: !82) +// CHECK:STDOUT: !84 = !DILocation(line: 18, column: 18, scope: !82) // CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !7) // CHECK:STDOUT: !88 = !DILocation(line: 18, column: 18, scope: !86) // CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !93) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !93) // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !7) // CHECK:STDOUT: !92 = !DILocation(line: 18, column: 18, scope: !90) // CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !7) -// CHECK:STDOUT: !96 = !DILocation(line: 18, column: 18, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !101) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !7) -// CHECK:STDOUT: !100 = !DILocation(line: 18, column: 18, scope: !98) -// CHECK:STDOUT: !101 = !{!99} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !37, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !37, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !103) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !7) +// CHECK:STDOUT: !101 = !DILocation(line: 19, column: 43, scope: !96) +// CHECK:STDOUT: !102 = !DILocation(line: 19, column: 36, scope: !96) +// CHECK:STDOUT: !103 = !{!97} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !37, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !126) // CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !7) -// CHECK:STDOUT: !109 = !DILocation(line: 19, column: 43, scope: !104) -// CHECK:STDOUT: !110 = !DILocation(line: 19, column: 36, scope: !104) -// CHECK:STDOUT: !111 = !{!105} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !37, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !134) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !7) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 2, scope: !112, type: !7) -// CHECK:STDOUT: !119 = !DILocation(line: 21, column: 7, scope: !112) -// CHECK:STDOUT: !121 = !DILocation(line: 21, column: 27, scope: !112) -// CHECK:STDOUT: !123 = !DILocation(line: 22, column: 11, scope: !112) -// CHECK:STDOUT: !124 = !DILocation(line: 22, column: 19, scope: !112) -// CHECK:STDOUT: !125 = !DILocation(line: 22, column: 10, scope: !112) -// CHECK:STDOUT: !128 = !DILocation(line: 23, column: 9, scope: !112) -// CHECK:STDOUT: !129 = !DILocation(line: 24, column: 38, scope: !112) -// CHECK:STDOUT: !130 = !DILocation(line: 24, column: 16, scope: !112) -// CHECK:STDOUT: !131 = !DILocation(line: 24, column: 9, scope: !112) -// CHECK:STDOUT: !132 = !DILocation(line: 26, column: 16, scope: !112) -// CHECK:STDOUT: !133 = !DILocation(line: 26, column: 9, scope: !112) -// CHECK:STDOUT: !134 = !{!113, !114} -// CHECK:STDOUT: !135 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !135, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !7) -// CHECK:STDOUT: !142 = !DILocation(line: 37, column: 12, scope: !136) -// CHECK:STDOUT: !143 = !DILocation(line: 37, column: 5, scope: !136) -// CHECK:STDOUT: !144 = !{!137} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !135, line: 39, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !153) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !7) -// CHECK:STDOUT: !151 = !DILocation(line: 40, column: 12, scope: !145) -// CHECK:STDOUT: !152 = !DILocation(line: 40, column: 5, scope: !145) -// CHECK:STDOUT: !153 = !{!146} -// CHECK:STDOUT: !154 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !154, line: 396, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !162) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 2, scope: !104, type: !7) +// CHECK:STDOUT: !111 = !DILocation(line: 21, column: 7, scope: !104) +// CHECK:STDOUT: !113 = !DILocation(line: 21, column: 27, scope: !104) +// CHECK:STDOUT: !115 = !DILocation(line: 22, column: 11, scope: !104) +// CHECK:STDOUT: !116 = !DILocation(line: 22, column: 19, scope: !104) +// CHECK:STDOUT: !117 = !DILocation(line: 22, column: 10, scope: !104) +// CHECK:STDOUT: !120 = !DILocation(line: 23, column: 9, scope: !104) +// CHECK:STDOUT: !121 = !DILocation(line: 24, column: 38, scope: !104) +// CHECK:STDOUT: !122 = !DILocation(line: 24, column: 16, scope: !104) +// CHECK:STDOUT: !123 = !DILocation(line: 24, column: 9, scope: !104) +// CHECK:STDOUT: !124 = !DILocation(line: 26, column: 16, scope: !104) +// CHECK:STDOUT: !125 = !DILocation(line: 26, column: 9, scope: !104) +// CHECK:STDOUT: !126 = !{!105, !106} +// CHECK:STDOUT: !127 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !127, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !136) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !7) +// CHECK:STDOUT: !134 = !DILocation(line: 37, column: 12, scope: !128) +// CHECK:STDOUT: !135 = !DILocation(line: 37, column: 5, scope: !128) +// CHECK:STDOUT: !136 = !{!129} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !127, line: 39, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !145) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !7) +// CHECK:STDOUT: !143 = !DILocation(line: 40, column: 12, scope: !137) +// CHECK:STDOUT: !144 = !DILocation(line: 40, column: 5, scope: !137) +// CHECK:STDOUT: !145 = !{!138} +// CHECK:STDOUT: !146 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !146, line: 396, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !154) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !6) +// CHECK:STDOUT: !150 = !DILocation(line: 398, column: 5, scope: !147) +// CHECK:STDOUT: !151 = !{null, !6, !6} +// CHECK:STDOUT: !152 = !DISubroutineType(types: !151) +// CHECK:STDOUT: !153 = !DILocation(line: 396, column: 3, scope: !147) +// CHECK:STDOUT: !154 = !{!148} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !127, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !162) // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !6) -// CHECK:STDOUT: !158 = !DILocation(line: 398, column: 5, scope: !155) -// CHECK:STDOUT: !159 = !{null, !6, !6} -// CHECK:STDOUT: !160 = !DISubroutineType(types: !159) -// CHECK:STDOUT: !161 = !DILocation(line: 396, column: 3, scope: !155) +// CHECK:STDOUT: !160 = !DILocation(line: 34, column: 12, scope: !155) +// CHECK:STDOUT: !161 = !DILocation(line: 34, column: 5, scope: !155) // CHECK:STDOUT: !162 = !{!156} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !135, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !170) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !6) -// CHECK:STDOUT: !168 = !DILocation(line: 34, column: 12, scope: !163) -// CHECK:STDOUT: !169 = !DILocation(line: 34, column: 5, scope: !163) -// CHECK:STDOUT: !170 = !{!164} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !135, line: 30, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !174 = !DILocation(line: 31, column: 12, scope: !171) -// CHECK:STDOUT: !175 = !DILocation(line: 31, column: 5, scope: !171) -// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !135, line: 141, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !127, line: 30, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !166 = !DILocation(line: 31, column: 12, scope: !163) +// CHECK:STDOUT: !167 = !DILocation(line: 31, column: 5, scope: !163) +// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !127, line: 141, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !175) +// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !7) +// CHECK:STDOUT: !173 = !DILocation(line: 142, column: 12, scope: !168) +// CHECK:STDOUT: !174 = !DILocation(line: 142, column: 5, scope: !168) +// CHECK:STDOUT: !175 = !{!169} +// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !127, line: 144, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) // CHECK:STDOUT: !177 = !DILocalVariable(arg: 1, scope: !176, type: !7) -// CHECK:STDOUT: !181 = !DILocation(line: 142, column: 12, scope: !176) -// CHECK:STDOUT: !182 = !DILocation(line: 142, column: 5, scope: !176) +// CHECK:STDOUT: !181 = !DILocation(line: 145, column: 12, scope: !176) +// CHECK:STDOUT: !182 = !DILocation(line: 145, column: 5, scope: !176) // CHECK:STDOUT: !183 = !{!177} -// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !135, line: 144, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) -// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !7) -// CHECK:STDOUT: !189 = !DILocation(line: 145, column: 12, scope: !184) -// CHECK:STDOUT: !190 = !DILocation(line: 145, column: 5, scope: !184) -// CHECK:STDOUT: !191 = !{!185} -// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !154, line: 331, type: !160, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !199) +// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !146, line: 331, type: !152, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) +// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !6) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 2, scope: !184, type: !6) +// CHECK:STDOUT: !187 = !DILocation(line: 0, scope: !184) +// CHECK:STDOUT: !188 = !DILocation(line: 331, column: 3, scope: !184) +// CHECK:STDOUT: !189 = !{!6, !6} +// CHECK:STDOUT: !190 = !DISubroutineType(types: !189) +// CHECK:STDOUT: !191 = !{!185, !186} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !127, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !205) // CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !6) -// CHECK:STDOUT: !194 = !DILocalVariable(arg: 2, scope: !192, type: !6) -// CHECK:STDOUT: !195 = !DILocation(line: 0, scope: !192) -// CHECK:STDOUT: !196 = !DILocation(line: 331, column: 3, scope: !192) -// CHECK:STDOUT: !197 = !{!6, !6} -// CHECK:STDOUT: !198 = !DISubroutineType(types: !197) -// CHECK:STDOUT: !199 = !{!193, !194} -// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !135, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !213) -// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !6) -// CHECK:STDOUT: !209 = !DILocation(line: 137, column: 5, scope: !200) -// CHECK:STDOUT: !211 = !DILocation(line: 138, column: 5, scope: !200) -// CHECK:STDOUT: !212 = !DILocation(line: 139, column: 5, scope: !200) -// CHECK:STDOUT: !213 = !{!201} -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !135, line: 125, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !221 = !DILocation(line: 128, column: 5, scope: !214) -// CHECK:STDOUT: !222 = !DILocation(line: 129, column: 5, scope: !214) -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !154, line: 64, type: !198, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !231) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !6) -// CHECK:STDOUT: !228 = !DILocation(line: 66, column: 17, scope: !223) -// CHECK:STDOUT: !230 = !DILocation(line: 66, column: 5, scope: !223) -// CHECK:STDOUT: !231 = !{!224} -// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !154, line: 59, type: !198, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !239) -// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !6) -// CHECK:STDOUT: !238 = !DILocation(line: 59, column: 28, scope: !232) -// CHECK:STDOUT: !239 = !{!233} +// CHECK:STDOUT: !201 = !DILocation(line: 137, column: 5, scope: !192) +// CHECK:STDOUT: !203 = !DILocation(line: 138, column: 5, scope: !192) +// CHECK:STDOUT: !204 = !DILocation(line: 139, column: 5, scope: !192) +// CHECK:STDOUT: !205 = !{!193} +// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !127, line: 125, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !213 = !DILocation(line: 128, column: 5, scope: !206) +// CHECK:STDOUT: !214 = !DILocation(line: 129, column: 5, scope: !206) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !146, line: 64, type: !190, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !223) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !6) +// CHECK:STDOUT: !220 = !DILocation(line: 66, column: 17, scope: !215) +// CHECK:STDOUT: !222 = !DILocation(line: 66, column: 5, scope: !215) +// CHECK:STDOUT: !223 = !{!216} +// CHECK:STDOUT: !224 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !146, line: 59, type: !190, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !231) +// CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !224, type: !6) +// CHECK:STDOUT: !230 = !DILocation(line: 59, column: 28, scope: !224) +// CHECK:STDOUT: !231 = !{!225} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/for.carbon b/toolchain/lower/testdata/for/for.carbon index d35e82dc4f3f..722e0a172894 100644 --- a/toolchain/lower/testdata/for/for.carbon +++ b/toolchain/lower/testdata/for/for.carbon @@ -70,8 +70,6 @@ fn For() { // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !32 { // CHECK:STDOUT: entry: @@ -92,205 +90,191 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !66 // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core"(ptr %self), !dbg !70 // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core"(ptr %self), !dbg !78 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self), !dbg !78 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core"(ptr %self) #0 !dbg !84 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core"(ptr %self), !dbg !86 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self), !dbg !86 // CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !88 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !90 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core"(ptr %self) #0 !dbg !92 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core"(ptr %self), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !94 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !98 { -// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !103 -// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !103 -// CHECK:STDOUT: ret i32 %1, !dbg !104 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !95 +// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !95 +// CHECK:STDOUT: ret i32 %1, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !106 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !113 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !113 -// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !115 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !113 -// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !118 -// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !118 -// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !117 -// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !117 -// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !119 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !98 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !105 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !105 +// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !107 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !105 +// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !110 +// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !110 +// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !109 +// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !109 +// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !111 // CHECK:STDOUT: // CHECK:STDOUT: 6: ; preds = %0 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !122 -// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !123 -// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %7), !dbg !124 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !114 +// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !115 +// CHECK:STDOUT: call void @_CSome.Optional.Core.fc4496a6c25d418b(ptr %return, i32 %7), !dbg !116 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !126 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: call void @_CNone.Optional.Core.fc4496a6c25d418b(ptr %return), !dbg !118 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !132 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !138 -// CHECK:STDOUT: ret i1 %1, !dbg !139 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !124 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !130 +// CHECK:STDOUT: ret i1 %1, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !141 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !147 -// CHECK:STDOUT: ret i32 %1, !dbg !148 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.fc4496a6c25d418b(ptr %self) #0 !dbg !133 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %self), !dbg !139 +// CHECK:STDOUT: ret i32 %1, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CInclusiveRange.Core(ptr sret({ i32, i32 }), i32, i32) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !151 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !154 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !143 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !151 { +// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !156 // CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !159 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return, i32 %value), !dbg !164 -// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !159 { +// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.fc4496a6c25d418b(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !167 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %return), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !164 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !169 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !169 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !169 +// CHECK:STDOUT: ret i1 %2, !dbg !170 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !172 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !177 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !177 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !177 -// CHECK:STDOUT: ret i1 %2, !dbg !178 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !180 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !185 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !185 -// CHECK:STDOUT: ret i32 %1, !dbg !186 +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr %value) #0 !dbg !172 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !177 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !177 +// CHECK:STDOUT: ret i32 %1, !dbg !178 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !188 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !191 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !192 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !192 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !192 -// CHECK:STDOUT: ret void, !dbg !192 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !180 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !183 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !184 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !184 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !184 +// CHECK:STDOUT: ret void, !dbg !184 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !196 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !205 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !205 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !207 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !207 -// CHECK:STDOUT: ret void, !dbg !208 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !188 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !197 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !197 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !199 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !199 +// CHECK:STDOUT: ret void, !dbg !200 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !210 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !217 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !217 -// CHECK:STDOUT: ret void, !dbg !218 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !202 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !209 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !209 +// CHECK:STDOUT: ret void, !dbg !210 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !219 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !224 -// CHECK:STDOUT: ret i32 %1, !dbg !226 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !211 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !216 +// CHECK:STDOUT: ret i32 %1, !dbg !218 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !228 { -// CHECK:STDOUT: ret i32 %self, !dbg !234 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !220 { +// CHECK:STDOUT: ret i32 %self, !dbg !226 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -345,141 +329,133 @@ fn For() { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !9) // CHECK:STDOUT: !42 = !DILocation(line: 19, column: 7, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !6) // CHECK:STDOUT: !46 = !DILocation(line: 19, column: 7, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !6) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !9) // CHECK:STDOUT: !50 = !DILocation(line: 19, column: 7, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !9) // CHECK:STDOUT: !54 = !DILocation(line: 19, column: 7, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !9) // CHECK:STDOUT: !58 = !DILocation(line: 19, column: 7, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !9) // CHECK:STDOUT: !62 = !DILocation(line: 19, column: 7, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !9) // CHECK:STDOUT: !66 = !DILocation(line: 19, column: 7, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a533f3082ff11b:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !9) // CHECK:STDOUT: !70 = !DILocation(line: 19, column: 7, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !9) -// CHECK:STDOUT: !74 = !DILocation(line: 19, column: 7, scope: !72) +// CHECK:STDOUT: !74 = !DILocation(line: 19, column: 18, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a4e50b707d8bfe:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !9) -// CHECK:STDOUT: !78 = !DILocation(line: 19, column: 7, scope: !76) +// CHECK:STDOUT: !78 = !DILocation(line: 19, column: 18, scope: !76) // CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !9) // CHECK:STDOUT: !82 = !DILocation(line: 19, column: 18, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e933d5ff8212e171:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !9) // CHECK:STDOUT: !86 = !DILocation(line: 19, column: 18, scope: !84) // CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !91) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !9) -// CHECK:STDOUT: !90 = !DILocation(line: 19, column: 18, scope: !88) -// CHECK:STDOUT: !91 = !{!89} -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c9184c281ed4335d:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !95) -// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !9) -// CHECK:STDOUT: !94 = !DILocation(line: 19, column: 18, scope: !92) -// CHECK:STDOUT: !95 = !{!93} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !31, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !105) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !31, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !97) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !9) +// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 43, scope: !90) +// CHECK:STDOUT: !96 = !DILocation(line: 19, column: 36, scope: !90) +// CHECK:STDOUT: !97 = !{!91} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !31, line: 20, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !122) // CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !9) -// CHECK:STDOUT: !103 = !DILocation(line: 19, column: 43, scope: !98) -// CHECK:STDOUT: !104 = !DILocation(line: 19, column: 36, scope: !98) -// CHECK:STDOUT: !105 = !{!99} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !31, line: 20, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !130) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !9) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 2, scope: !106, type: !9) -// CHECK:STDOUT: !113 = !DILocation(line: 21, column: 7, scope: !106) -// CHECK:STDOUT: !115 = !DILocation(line: 21, column: 27, scope: !106) -// CHECK:STDOUT: !117 = !DILocation(line: 22, column: 11, scope: !106) -// CHECK:STDOUT: !118 = !DILocation(line: 22, column: 19, scope: !106) -// CHECK:STDOUT: !119 = !DILocation(line: 22, column: 10, scope: !106) -// CHECK:STDOUT: !122 = !DILocation(line: 23, column: 9, scope: !106) -// CHECK:STDOUT: !123 = !DILocation(line: 24, column: 38, scope: !106) -// CHECK:STDOUT: !124 = !DILocation(line: 24, column: 16, scope: !106) -// CHECK:STDOUT: !125 = !DILocation(line: 24, column: 9, scope: !106) -// CHECK:STDOUT: !126 = !DILocation(line: 26, column: 16, scope: !106) -// CHECK:STDOUT: !127 = !{!9} -// CHECK:STDOUT: !128 = !DISubroutineType(types: !127) -// CHECK:STDOUT: !129 = !DILocation(line: 26, column: 9, scope: !106) -// CHECK:STDOUT: !130 = !{!107, !108} -// CHECK:STDOUT: !131 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !131, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !9) -// CHECK:STDOUT: !138 = !DILocation(line: 37, column: 12, scope: !132) -// CHECK:STDOUT: !139 = !DILocation(line: 37, column: 5, scope: !132) -// CHECK:STDOUT: !140 = !{!133} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !131, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !149) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !9) -// CHECK:STDOUT: !147 = !DILocation(line: 40, column: 12, scope: !141) -// CHECK:STDOUT: !148 = !DILocation(line: 40, column: 5, scope: !141) -// CHECK:STDOUT: !149 = !{!142} -// CHECK:STDOUT: !150 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !150, line: 396, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !158) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !9) +// CHECK:STDOUT: !105 = !DILocation(line: 21, column: 7, scope: !98) +// CHECK:STDOUT: !107 = !DILocation(line: 21, column: 27, scope: !98) +// CHECK:STDOUT: !109 = !DILocation(line: 22, column: 11, scope: !98) +// CHECK:STDOUT: !110 = !DILocation(line: 22, column: 19, scope: !98) +// CHECK:STDOUT: !111 = !DILocation(line: 22, column: 10, scope: !98) +// CHECK:STDOUT: !114 = !DILocation(line: 23, column: 9, scope: !98) +// CHECK:STDOUT: !115 = !DILocation(line: 24, column: 38, scope: !98) +// CHECK:STDOUT: !116 = !DILocation(line: 24, column: 16, scope: !98) +// CHECK:STDOUT: !117 = !DILocation(line: 24, column: 9, scope: !98) +// CHECK:STDOUT: !118 = !DILocation(line: 26, column: 16, scope: !98) +// CHECK:STDOUT: !119 = !{!9} +// CHECK:STDOUT: !120 = !DISubroutineType(types: !119) +// CHECK:STDOUT: !121 = !DILocation(line: 26, column: 9, scope: !98) +// CHECK:STDOUT: !122 = !{!99, !100} +// CHECK:STDOUT: !123 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.fc4496a6c25d418b", scope: null, file: !123, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !9) +// CHECK:STDOUT: !130 = !DILocation(line: 37, column: 12, scope: !124) +// CHECK:STDOUT: !131 = !DILocation(line: 37, column: 5, scope: !124) +// CHECK:STDOUT: !132 = !{!125} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.fc4496a6c25d418b", scope: null, file: !123, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !141) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !9) +// CHECK:STDOUT: !139 = !DILocation(line: 40, column: 12, scope: !133) +// CHECK:STDOUT: !140 = !DILocation(line: 40, column: 5, scope: !133) +// CHECK:STDOUT: !141 = !{!134} +// CHECK:STDOUT: !142 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !142, line: 396, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !150) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !6) +// CHECK:STDOUT: !146 = !DILocation(line: 398, column: 5, scope: !143) +// CHECK:STDOUT: !147 = !{null, !6, !6} +// CHECK:STDOUT: !148 = !DISubroutineType(types: !147) +// CHECK:STDOUT: !149 = !DILocation(line: 396, column: 3, scope: !143) +// CHECK:STDOUT: !150 = !{!144} +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !123, line: 33, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !158) // CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !6) -// CHECK:STDOUT: !154 = !DILocation(line: 398, column: 5, scope: !151) -// CHECK:STDOUT: !155 = !{null, !6, !6} -// CHECK:STDOUT: !156 = !DISubroutineType(types: !155) -// CHECK:STDOUT: !157 = !DILocation(line: 396, column: 3, scope: !151) +// CHECK:STDOUT: !156 = !DILocation(line: 34, column: 12, scope: !151) +// CHECK:STDOUT: !157 = !DILocation(line: 34, column: 5, scope: !151) // CHECK:STDOUT: !158 = !{!152} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.fc4496a6c25d418b", scope: null, file: !131, line: 33, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !166) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !6) -// CHECK:STDOUT: !164 = !DILocation(line: 34, column: 12, scope: !159) -// CHECK:STDOUT: !165 = !DILocation(line: 34, column: 5, scope: !159) -// CHECK:STDOUT: !166 = !{!160} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !131, line: 30, type: !128, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !170 = !DILocation(line: 31, column: 12, scope: !167) -// CHECK:STDOUT: !171 = !DILocation(line: 31, column: 5, scope: !167) -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !131, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !179) +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.fc4496a6c25d418b", scope: null, file: !123, line: 30, type: !120, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !162 = !DILocation(line: 31, column: 12, scope: !159) +// CHECK:STDOUT: !163 = !DILocation(line: 31, column: 5, scope: !159) +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !123, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !171) +// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !9) +// CHECK:STDOUT: !169 = !DILocation(line: 142, column: 12, scope: !164) +// CHECK:STDOUT: !170 = !DILocation(line: 142, column: 5, scope: !164) +// CHECK:STDOUT: !171 = !{!165} +// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !123, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !179) // CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !9) -// CHECK:STDOUT: !177 = !DILocation(line: 142, column: 12, scope: !172) -// CHECK:STDOUT: !178 = !DILocation(line: 142, column: 5, scope: !172) +// CHECK:STDOUT: !177 = !DILocation(line: 145, column: 12, scope: !172) +// CHECK:STDOUT: !178 = !DILocation(line: 145, column: 5, scope: !172) // CHECK:STDOUT: !179 = !{!173} -// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !131, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !187) -// CHECK:STDOUT: !181 = !DILocalVariable(arg: 1, scope: !180, type: !9) -// CHECK:STDOUT: !185 = !DILocation(line: 145, column: 12, scope: !180) -// CHECK:STDOUT: !186 = !DILocation(line: 145, column: 5, scope: !180) -// CHECK:STDOUT: !187 = !{!181} -// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !150, line: 331, type: !156, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !195) +// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !142, line: 331, type: !148, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !187) +// CHECK:STDOUT: !181 = !DILocalVariable(arg: 1, scope: !180, type: !6) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 2, scope: !180, type: !6) +// CHECK:STDOUT: !183 = !DILocation(line: 0, scope: !180) +// CHECK:STDOUT: !184 = !DILocation(line: 331, column: 3, scope: !180) +// CHECK:STDOUT: !185 = !{!6, !6} +// CHECK:STDOUT: !186 = !DISubroutineType(types: !185) +// CHECK:STDOUT: !187 = !{!181, !182} +// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !123, line: 131, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !201) // CHECK:STDOUT: !189 = !DILocalVariable(arg: 1, scope: !188, type: !6) -// CHECK:STDOUT: !190 = !DILocalVariable(arg: 2, scope: !188, type: !6) -// CHECK:STDOUT: !191 = !DILocation(line: 0, scope: !188) -// CHECK:STDOUT: !192 = !DILocation(line: 331, column: 3, scope: !188) -// CHECK:STDOUT: !193 = !{!6, !6} -// CHECK:STDOUT: !194 = !DISubroutineType(types: !193) -// CHECK:STDOUT: !195 = !{!189, !190} -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !131, line: 131, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !209) -// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !6) -// CHECK:STDOUT: !205 = !DILocation(line: 137, column: 5, scope: !196) -// CHECK:STDOUT: !207 = !DILocation(line: 138, column: 5, scope: !196) -// CHECK:STDOUT: !208 = !DILocation(line: 139, column: 5, scope: !196) -// CHECK:STDOUT: !209 = !{!197} -// CHECK:STDOUT: !210 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !131, line: 125, type: !128, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !217 = !DILocation(line: 128, column: 5, scope: !210) -// CHECK:STDOUT: !218 = !DILocation(line: 129, column: 5, scope: !210) -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !150, line: 64, type: !194, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !227) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !6) -// CHECK:STDOUT: !224 = !DILocation(line: 66, column: 17, scope: !219) -// CHECK:STDOUT: !226 = !DILocation(line: 66, column: 5, scope: !219) -// CHECK:STDOUT: !227 = !{!220} -// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !150, line: 59, type: !194, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !235) -// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !6) -// CHECK:STDOUT: !234 = !DILocation(line: 59, column: 28, scope: !228) -// CHECK:STDOUT: !235 = !{!229} +// CHECK:STDOUT: !197 = !DILocation(line: 137, column: 5, scope: !188) +// CHECK:STDOUT: !199 = !DILocation(line: 138, column: 5, scope: !188) +// CHECK:STDOUT: !200 = !DILocation(line: 139, column: 5, scope: !188) +// CHECK:STDOUT: !201 = !{!189} +// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.4d9f279dbc2b9f6f", scope: null, file: !123, line: 125, type: !120, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !209 = !DILocation(line: 128, column: 5, scope: !202) +// CHECK:STDOUT: !210 = !DILocation(line: 129, column: 5, scope: !202) +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !142, line: 64, type: !186, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !219) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !6) +// CHECK:STDOUT: !216 = !DILocation(line: 66, column: 17, scope: !211) +// CHECK:STDOUT: !218 = !DILocation(line: 66, column: 5, scope: !211) +// CHECK:STDOUT: !219 = !{!212} +// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !142, line: 59, type: !186, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !227) +// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !6) +// CHECK:STDOUT: !226 = !DILocation(line: 59, column: 28, scope: !220) +// CHECK:STDOUT: !227 = !{!221} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/form.carbon b/toolchain/lower/testdata/function/call/form.carbon index 369fd4d77b2d..6de806f4d32e 100644 --- a/toolchain/lower/testdata/function/call/form.carbon +++ b/toolchain/lower/testdata/function/call/form.carbon @@ -89,18 +89,11 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -127,14 +120,10 @@ fn G() { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !20) // CHECK:STDOUT: !34 = !DILocation(line: 6, column: 3, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 6, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !42 = !DILocation(line: 6, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_form_param.carbon' @@ -143,42 +132,35 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !46 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !47 -// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !47 -// CHECK:STDOUT: call void @_CF.Main(ptr %x.var), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %x.var), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !43 +// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !43 +// CHECK:STDOUT: call void @_CF.Main(ptr %x.var), !dbg !44 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %x.var), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !58 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!41} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -188,24 +170,20 @@ fn G() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !44 = !DIFile(filename: "var_form_param.carbon", directory: "") -// CHECK:STDOUT: !45 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !44, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !44, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !45) -// CHECK:STDOUT: !47 = !DILocation(line: 3, column: 6, scope: !46) -// CHECK:STDOUT: !48 = !DILocation(line: 6, column: 3, scope: !46) -// CHECK:STDOUT: !49 = !DILocation(line: 5, column: 1, scope: !46) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !44, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !53) +// CHECK:STDOUT: !40 = !DIFile(filename: "var_form_param.carbon", directory: "") +// CHECK:STDOUT: !41 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !40, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !40, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !41) +// CHECK:STDOUT: !43 = !DILocation(line: 3, column: 6, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 6, column: 3, scope: !42) +// CHECK:STDOUT: !45 = !DILocation(line: 5, column: 1, scope: !42) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !40, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !48 = !DILocation(line: 3, column: 6, scope: !46) +// CHECK:STDOUT: !49 = !{!47} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !40, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) // CHECK:STDOUT: !52 = !DILocation(line: 3, column: 6, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !44, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 3, column: 6, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !44, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) -// CHECK:STDOUT: !60 = !DILocation(line: 3, column: 6, scope: !58) -// CHECK:STDOUT: !61 = !{!59} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_form_param.carbon' @@ -214,26 +192,26 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(i32) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !64 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(i32 0), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: call void @_CF.Main(i32 0), !dbg !57 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!63} +// CHECK:STDOUT: !llvm.dbg.cu = !{!55} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !62 = !DIFile(filename: "val_form_param.carbon", directory: "") -// CHECK:STDOUT: !63 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !62, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !62, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !63) -// CHECK:STDOUT: !65 = !DILocation(line: 6, column: 3, scope: !64) -// CHECK:STDOUT: !66 = !DILocation(line: 5, column: 1, scope: !64) +// CHECK:STDOUT: !54 = !DIFile(filename: "val_form_param.carbon", directory: "") +// CHECK:STDOUT: !55 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !54, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !54, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !55) +// CHECK:STDOUT: !57 = !DILocation(line: 6, column: 3, scope: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 5, column: 1, scope: !56) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'ref_return_form.carbon' @@ -242,26 +220,26 @@ fn G() { // CHECK:STDOUT: declare ptr @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !72 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!68} +// CHECK:STDOUT: !llvm.dbg.cu = !{!60} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !67 = !DIFile(filename: "ref_return_form.carbon", directory: "") -// CHECK:STDOUT: !68 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !67, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !67, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !68) -// CHECK:STDOUT: !73 = !DILocation(line: 6, column: 27, scope: !72) -// CHECK:STDOUT: !76 = !DILocation(line: 5, column: 1, scope: !72) +// CHECK:STDOUT: !59 = !DIFile(filename: "ref_return_form.carbon", directory: "") +// CHECK:STDOUT: !60 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !59, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !59, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !60) +// CHECK:STDOUT: !65 = !DILocation(line: 6, column: 27, scope: !64) +// CHECK:STDOUT: !68 = !DILocation(line: 5, column: 1, scope: !64) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_return_form.carbon' @@ -270,33 +248,26 @@ fn G() { // CHECK:STDOUT: declare i32 @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !81 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !82 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !83 -// CHECK:STDOUT: store i32 %F.call, ptr %x.var, align 4, !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %x.var), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !74 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !75 +// CHECK:STDOUT: store i32 %F.call, ptr %x.var, align 4, !dbg !74 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %x.var), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !95 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -305,7 +276,7 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!78} +// CHECK:STDOUT: !llvm.dbg.cu = !{!70} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -315,24 +286,20 @@ fn G() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !77 = !DIFile(filename: "var_return_form.carbon", directory: "") -// CHECK:STDOUT: !78 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !77, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !77, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !78) -// CHECK:STDOUT: !82 = !DILocation(line: 6, column: 14, scope: !81) -// CHECK:STDOUT: !83 = !DILocation(line: 6, column: 27, scope: !81) -// CHECK:STDOUT: !86 = !DILocation(line: 5, column: 1, scope: !81) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !77, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !20) -// CHECK:STDOUT: !89 = !DILocation(line: 6, column: 14, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !77, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !20) -// CHECK:STDOUT: !93 = !DILocation(line: 6, column: 14, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !77, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !20) -// CHECK:STDOUT: !97 = !DILocation(line: 6, column: 14, scope: !95) -// CHECK:STDOUT: !98 = !{!96} +// CHECK:STDOUT: !69 = !DIFile(filename: "var_return_form.carbon", directory: "") +// CHECK:STDOUT: !70 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !69, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !69, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !70) +// CHECK:STDOUT: !74 = !DILocation(line: 6, column: 14, scope: !73) +// CHECK:STDOUT: !75 = !DILocation(line: 6, column: 27, scope: !73) +// CHECK:STDOUT: !78 = !DILocation(line: 5, column: 1, scope: !73) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !69, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !82) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !20) +// CHECK:STDOUT: !81 = !DILocation(line: 6, column: 14, scope: !79) +// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !69, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !86) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !20) +// CHECK:STDOUT: !85 = !DILocation(line: 6, column: 14, scope: !83) +// CHECK:STDOUT: !86 = !{!84} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_return_form.carbon' @@ -341,24 +308,24 @@ fn G() { // CHECK:STDOUT: declare i32 @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !101 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !90 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!100} +// CHECK:STDOUT: !llvm.dbg.cu = !{!88} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !99 = !DIFile(filename: "val_return_form.carbon", directory: "") -// CHECK:STDOUT: !100 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !99, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !99, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !100) -// CHECK:STDOUT: !102 = !DILocation(line: 6, column: 23, scope: !101) -// CHECK:STDOUT: !105 = !DILocation(line: 5, column: 1, scope: !101) +// CHECK:STDOUT: !87 = !DIFile(filename: "val_return_form.carbon", directory: "") +// CHECK:STDOUT: !88 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !87, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !87, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !90 = !DILocation(line: 6, column: 23, scope: !89) +// CHECK:STDOUT: !93 = !DILocation(line: 5, column: 1, scope: !89) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/i32.carbon b/toolchain/lower/testdata/function/call/i32.carbon index 3479d07e4ccb..99ead6c8c4fc 100644 --- a/toolchain/lower/testdata/function/call/i32.carbon +++ b/toolchain/lower/testdata/function/call/i32.carbon @@ -46,18 +46,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !50 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -90,12 +83,8 @@ fn Main() { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 18, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) -// CHECK:STDOUT: !50 = !DILocation(line: 18, column: 3, scope: !48) -// CHECK:STDOUT: !51 = !{!49} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/ref_param.carbon b/toolchain/lower/testdata/function/call/ref_param.carbon index 9ee2609ba54f..840a4ad921c5 100644 --- a/toolchain/lower/testdata/function/call/ref_param.carbon +++ b/toolchain/lower/testdata/function/call/ref_param.carbon @@ -45,18 +45,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -87,12 +80,8 @@ fn Main() { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) -// CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/ref_return.carbon b/toolchain/lower/testdata/function/call/ref_return.carbon index 92a132b78e13..492f324422e4 100644 --- a/toolchain/lower/testdata/function/call/ref_return.carbon +++ b/toolchain/lower/testdata/function/call/ref_return.carbon @@ -48,18 +48,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -93,12 +86,8 @@ fn Main() { // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !20) // CHECK:STDOUT: !45 = !DILocation(line: 18, column: 3, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) // CHECK:STDOUT: !49 = !DILocation(line: 18, column: 3, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} // CHECK:STDOUT: 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 cb025b16aec0..4fee29e72a50 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 @@ -58,31 +58,24 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -122,20 +115,16 @@ fn Main() { // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) // CHECK:STDOUT: !49 = !DILocation(line: 18, column: 3, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20) // CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) // CHECK:STDOUT: !57 = !DILocation(line: 18, column: 3, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !21) // CHECK:STDOUT: !61 = !DILocation(line: 18, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !21) -// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/var_param.carbon b/toolchain/lower/testdata/function/call/var_param.carbon index 749611b56bf8..f61ecc879f60 100644 --- a/toolchain/lower/testdata/function/call/var_param.carbon +++ b/toolchain/lower/testdata/function/call/var_param.carbon @@ -46,18 +46,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -89,12 +82,8 @@ fn Main() { // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) -// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/destroy.carbon b/toolchain/lower/testdata/function/definition/destroy.carbon index 6a919b577f1c..8e60f386794e 100644 --- a/toolchain/lower/testdata/function/definition/destroy.carbon +++ b/toolchain/lower/testdata/function/definition/destroy.carbon @@ -101,18 +101,11 @@ fn InitLet() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !39 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -144,14 +137,10 @@ fn InitLet() { // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !16) // CHECK:STDOUT: !33 = !DILocation(line: 12, column: 5, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !16) // CHECK:STDOUT: !37 = !DILocation(line: 12, column: 5, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !16) -// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 5, scope: !39) -// CHECK:STDOUT: !42 = !{!40} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_param.carbon' @@ -160,44 +149,37 @@ fn InitLet() { // CHECK:STDOUT: @C.val.loc6 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !45 { +// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CG.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !51 { +// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !52 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6, i64 0, i1 false), !dbg !52 -// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !52 -// CHECK:STDOUT: call void @_CG.Main(), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !48 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6, i64 0, i1 false), !dbg !48 +// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !49 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !48 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -207,7 +189,7 @@ fn InitLet() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!44} +// CHECK:STDOUT: !llvm.dbg.cu = !{!40} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -217,29 +199,25 @@ fn InitLet() { // CHECK:STDOUT: !18 = !DISubroutineType(types: !17) // CHECK:STDOUT: !19 = !{null} // CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !43 = !DIFile(filename: "var_param.carbon", directory: "") -// CHECK:STDOUT: !44 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !43, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !50) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !16) -// CHECK:STDOUT: !49 = !DILocation(line: 6, column: 1, scope: !45) -// CHECK:STDOUT: !50 = !{!46} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !43, line: 11, type: !20, spFlags: DISPFlagDefinition, unit: !44) -// CHECK:STDOUT: !52 = !DILocation(line: 6, column: 6, scope: !51) -// CHECK:STDOUT: !53 = !DILocation(line: 12, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !DILocation(line: 13, column: 3, scope: !51) -// CHECK:STDOUT: !55 = !DILocation(line: 11, column: 1, scope: !51) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !59) +// CHECK:STDOUT: !39 = !DIFile(filename: "var_param.carbon", directory: "") +// CHECK:STDOUT: !40 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !39, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !46) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !16) +// CHECK:STDOUT: !45 = !DILocation(line: 6, column: 1, scope: !41) +// CHECK:STDOUT: !46 = !{!42} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !39, line: 11, type: !20, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !48 = !DILocation(line: 6, column: 6, scope: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 12, column: 3, scope: !47) +// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 3, scope: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 11, column: 1, scope: !47) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !55) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !16) +// CHECK:STDOUT: !54 = !DILocation(line: 6, column: 6, scope: !52) +// CHECK:STDOUT: !55 = !{!53} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !39, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !16) // CHECK:STDOUT: !58 = !DILocation(line: 6, column: 6, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !16) -// CHECK:STDOUT: !62 = !DILocation(line: 6, column: 6, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !43, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !44, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !16) -// CHECK:STDOUT: !66 = !DILocation(line: 6, column: 6, scope: !64) -// CHECK:STDOUT: !67 = !{!65} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_slot.carbon' @@ -248,60 +226,53 @@ fn InitLet() { // CHECK:STDOUT: @C.val.loc7_12 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({}) %return) #0 !dbg !72 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({}) %return) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc7_12, i64 0, i1 false), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc7_12, i64 0, i1 false), !dbg !67 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CG.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CForward.Main(ptr sret({}) %return) #0 !dbg !76 { +// CHECK:STDOUT: define void @_CForward.Main(ptr sret({}) %return) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !79 -// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !81 { +// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !82 -// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !83 -// CHECK:STDOUT: call void @_CG.Main(), !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !74 +// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !75 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !77 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define void @_CInitLet.Main() #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !97 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitLet.Main() #0 !dbg !99 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_16.1.temp = alloca {}, align 1, !dbg !100 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_16.1.temp), !dbg !100 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc22_16.1.temp), !dbg !100 -// CHECK:STDOUT: call void @_CG.Main(), !dbg !103 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc22_16.1.temp), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: %.loc22_16.1.temp = alloca {}, align 1, !dbg !88 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_16.1.temp), !dbg !88 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc22_16.1.temp), !dbg !88 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !91 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc22_16.1.temp), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -316,7 +287,7 @@ fn InitLet() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!69} +// CHECK:STDOUT: !llvm.dbg.cu = !{!61} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -326,34 +297,30 @@ fn InitLet() { // CHECK:STDOUT: !18 = !DISubroutineType(types: !17) // CHECK:STDOUT: !19 = !{null} // CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !68 = !DIFile(filename: "return_slot.carbon", directory: "") -// CHECK:STDOUT: !69 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !68, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !70 = !{!16} -// CHECK:STDOUT: !71 = !DISubroutineType(types: !70) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !68, line: 6, type: !71, spFlags: DISPFlagDefinition, unit: !69) -// CHECK:STDOUT: !75 = !DILocation(line: 7, column: 3, scope: !72) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !68, line: 12, type: !71, spFlags: DISPFlagDefinition, unit: !69) -// CHECK:STDOUT: !79 = !DILocation(line: 13, column: 10, scope: !76) -// CHECK:STDOUT: !80 = !DILocation(line: 13, column: 3, scope: !76) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !68, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !69) -// CHECK:STDOUT: !82 = !DILocation(line: 17, column: 3, scope: !81) -// CHECK:STDOUT: !83 = !DILocation(line: 17, column: 14, scope: !81) -// CHECK:STDOUT: !85 = !DILocation(line: 18, column: 3, scope: !81) -// CHECK:STDOUT: !86 = !DILocation(line: 16, column: 1, scope: !81) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !16) -// CHECK:STDOUT: !89 = !DILocation(line: 17, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !16) -// CHECK:STDOUT: !93 = !DILocation(line: 17, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !68, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !16) -// CHECK:STDOUT: !97 = !DILocation(line: 17, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !68, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !69) -// CHECK:STDOUT: !100 = !DILocation(line: 22, column: 14, scope: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 23, column: 3, scope: !99) -// CHECK:STDOUT: !104 = !DILocation(line: 21, column: 1, scope: !99) +// CHECK:STDOUT: !60 = !DIFile(filename: "return_slot.carbon", directory: "") +// CHECK:STDOUT: !61 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !60, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !62 = !{!16} +// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !60, line: 6, type: !63, spFlags: DISPFlagDefinition, unit: !61) +// CHECK:STDOUT: !67 = !DILocation(line: 7, column: 3, scope: !64) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !60, line: 12, type: !63, spFlags: DISPFlagDefinition, unit: !61) +// CHECK:STDOUT: !71 = !DILocation(line: 13, column: 10, scope: !68) +// CHECK:STDOUT: !72 = !DILocation(line: 13, column: 3, scope: !68) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !60, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !61) +// CHECK:STDOUT: !74 = !DILocation(line: 17, column: 3, scope: !73) +// CHECK:STDOUT: !75 = !DILocation(line: 17, column: 14, scope: !73) +// CHECK:STDOUT: !77 = !DILocation(line: 18, column: 3, scope: !73) +// CHECK:STDOUT: !78 = !DILocation(line: 16, column: 1, scope: !73) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !60, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !82) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !16) +// CHECK:STDOUT: !81 = !DILocation(line: 17, column: 3, scope: !79) +// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !60, line: 17, type: !18, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !86) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !16) +// CHECK:STDOUT: !85 = !DILocation(line: 17, column: 3, scope: !83) +// CHECK:STDOUT: !86 = !{!84} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !60, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !61) +// CHECK:STDOUT: !88 = !DILocation(line: 22, column: 14, scope: !87) +// CHECK:STDOUT: !91 = !DILocation(line: 23, column: 3, scope: !87) +// CHECK:STDOUT: !92 = !DILocation(line: 21, column: 1, scope: !87) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/var_param.carbon b/toolchain/lower/testdata/function/definition/var_param.carbon index 4d94aab0df69..405335e817c9 100644 --- a/toolchain/lower/testdata/function/definition/var_param.carbon +++ b/toolchain/lower/testdata/function/definition/var_param.carbon @@ -112,37 +112,23 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !91 // CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !93 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !103 -// CHECK:STDOUT: ret void, !dbg !103 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -216,24 +202,16 @@ fn Call() { // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !20) // CHECK:STDOUT: !83 = !DILocation(line: 15, column: 15, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !20) // CHECK:STDOUT: !87 = !DILocation(line: 15, column: 15, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !20) -// CHECK:STDOUT: !91 = !DILocation(line: 15, column: 15, scope: !89) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !23) +// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 13, scope: !89) // CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96) // CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !23) // CHECK:STDOUT: !95 = !DILocation(line: 16, column: 13, scope: !93) // CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !23) -// CHECK:STDOUT: !99 = !DILocation(line: 16, column: 13, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !23) -// CHECK:STDOUT: !103 = !DILocation(line: 16, column: 13, scope: !101) -// CHECK:STDOUT: !104 = !{!102} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 66851abd127a..5b5e2174b241 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -74,69 +74,41 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !71 // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !83 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !91 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core"(ptr %self), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !95 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !103 -// CHECK:STDOUT: ret void, !dbg !103 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -144,27 +116,27 @@ fn G() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %_) #0 !dbg !105 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %_) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !115 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !120 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.26 %_) #0 !dbg !125 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.26 %_) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -207,60 +179,44 @@ fn G() { // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !37) // CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !37) // CHECK:STDOUT: !67 = !DILocation(line: 23, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 23, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) -// CHECK:STDOUT: !71 = !DILocation(line: 23, column: 3, scope: !69) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !34) +// CHECK:STDOUT: !71 = !DILocation(line: 22, column: 3, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !34) // CHECK:STDOUT: !75 = !DILocation(line: 22, column: 3, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !34) -// CHECK:STDOUT: !79 = !DILocation(line: 22, column: 3, scope: !77) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !37) +// CHECK:STDOUT: !79 = !DILocation(line: 21, column: 3, scope: !77) // CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !34) -// CHECK:STDOUT: !83 = !DILocation(line: 22, column: 3, scope: !81) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !37) +// CHECK:STDOUT: !83 = !DILocation(line: 21, column: 3, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !37) -// CHECK:STDOUT: !87 = !DILocation(line: 21, column: 3, scope: !85) +// CHECK:STDOUT: !87 = !DILocation(line: 20, column: 3, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !93) // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !37) -// CHECK:STDOUT: !91 = !DILocation(line: 21, column: 3, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !32, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !37) -// CHECK:STDOUT: !95 = !DILocation(line: 21, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !37) -// CHECK:STDOUT: !99 = !DILocation(line: 20, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 20, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) -// CHECK:STDOUT: !103 = !DILocation(line: 20, column: 3, scope: !101) -// CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !109) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !37) -// CHECK:STDOUT: !108 = !DILocation(line: 13, column: 1, scope: !105) -// CHECK:STDOUT: !109 = !{!106} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !119) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !34) -// CHECK:STDOUT: !118 = !DILocation(line: 13, column: 1, scope: !115) -// CHECK:STDOUT: !119 = !{!116} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !124) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !37) -// CHECK:STDOUT: !123 = !DILocation(line: 13, column: 1, scope: !120) -// CHECK:STDOUT: !124 = !{!121} -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !129) -// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !37) -// CHECK:STDOUT: !128 = !DILocation(line: 13, column: 1, scope: !125) -// CHECK:STDOUT: !129 = !{!126} +// CHECK:STDOUT: !92 = !DILocation(line: 13, column: 1, scope: !89) +// CHECK:STDOUT: !93 = !{!90} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !103) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !34) +// CHECK:STDOUT: !102 = !DILocation(line: 13, column: 1, scope: !99) +// CHECK:STDOUT: !103 = !{!100} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !108) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !37) +// CHECK:STDOUT: !107 = !DILocation(line: 13, column: 1, scope: !104) +// CHECK:STDOUT: !108 = !{!105} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !32, line: 13, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !113) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !37) +// CHECK:STDOUT: !112 = !DILocation(line: 13, column: 1, scope: !109) +// CHECK:STDOUT: !113 = !{!110} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index d1abf45a86df..7aac421abcec 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -77,94 +77,73 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !80 +// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !82 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !80 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !80 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !82 +// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !82 +// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !84 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc52), !dbg !85 +// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !86 +// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %.loc53_18), !dbg !87 +// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !92 +// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc54), !dbg !93 +// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !94 +// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.cfa50e0c7743522e(double %.loc55_18), !dbg !95 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %p.var), !dbg !82 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !88 -// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !90 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !88 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !88 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !90 -// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !90 -// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !92 -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %.loc52), !dbg !93 -// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !94 -// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %.loc53_18), !dbg !95 -// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !100 -// CHECK:STDOUT: call void @_CF.Main.073fbce68be6103e(double %.loc54), !dbg !101 -// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !102 -// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.cfa50e0c7743522e(double %.loc55_18), !dbg !103 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %p.var), !dbg !90 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !88 -// CHECK:STDOUT: ret void, !dbg !106 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !113 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !115 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !117 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -174,154 +153,154 @@ fn M() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !119 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !124 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !130 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !133 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !134 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !135 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !139 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !143 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !147 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !151 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !154 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !130 -// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !130 -// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !130 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !130 -// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !131 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !133 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x), !dbg !133 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !134 -// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !133 -// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !133 -// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %.loc31_8.5), !dbg !134 -// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !134 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !133 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !135 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !135 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !137 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !138 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !139 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !139 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !141 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !142 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !143 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !143 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !145 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !146 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !147 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !147 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !149 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !150 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !151 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !154 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !151 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !147 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !143 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !139 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !135 -// CHECK:STDOUT: ret i32 %x, !dbg !156 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !118 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !121 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !122 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !123 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !127 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !131 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !135 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !139 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !142 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !118 +// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !118 +// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !118 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !118 +// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !119 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !121 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x), !dbg !121 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !122 +// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !121 +// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !121 +// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %.loc31_8.5), !dbg !122 +// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !122 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !122 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !121 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !123 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !123 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !125 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !127 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !127 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !129 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !130 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !131 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !131 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !133 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !134 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !135 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !135 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !137 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !138 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !139 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !142 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !142 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !142 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !139 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !135 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !131 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !127 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !123 +// CHECK:STDOUT: ret i32 %x, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !158 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.073fbce68be6103e(double %_) #0 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.cfa50e0c7743522e(double %x) #0 !dbg !163 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.cfa50e0c7743522e(double %x) #0 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !169 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !172 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !173 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !174 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !178 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !182 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !186 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !190 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !169 -// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.c5e4ba542a56b71f(double %x), !dbg !169 -// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !169 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !169 -// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !170 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !172 -// CHECK:STDOUT: %G.call = call double @_CG.Main.cfa50e0c7743522e(double %x), !dbg !172 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !173 -// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !172 -// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !172 -// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc31_8.5), !dbg !173 -// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !172 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !174 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !174 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !176 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !177 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !178 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !178 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !180 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !181 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !182 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !182 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !184 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !185 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !186 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !186 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !188 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !189 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !193 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !190 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !186 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !182 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !178 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !174 -// CHECK:STDOUT: ret double %x, !dbg !195 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !157 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !160 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !161 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !162 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !166 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !170 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !174 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !178 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !181 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !157 +// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.c5e4ba542a56b71f(double %x), !dbg !157 +// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !157 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !157 +// CHECK:STDOUT: %H.call.loc30 = call %type.26 @_CH.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !158 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !160 +// CHECK:STDOUT: %G.call = call double @_CG.Main.cfa50e0c7743522e(double %x), !dbg !160 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !161 +// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !160 +// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !160 +// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc31_8.5), !dbg !161 +// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !161 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !161 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !160 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !162 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !162 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !164 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.c5e4ba542a56b71f(double %.loc35_5), !dbg !165 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !166 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !166 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !168 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc37_5), !dbg !169 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !170 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !170 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !172 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc39_5), !dbg !173 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !174 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !174 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !176 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.a76b78461416b4a8(ptr %.loc41_5), !dbg !177 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !178 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !181 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !181 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !181 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !178 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !174 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !170 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !166 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !162 +// CHECK:STDOUT: ret double %x, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !197 { +// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !185 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !203 +// CHECK:STDOUT: ret i32 %x, !dbg !191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CH.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !205 { +// CHECK:STDOUT: define linkonce_odr %type.26 @_CH.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !193 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !211 +// CHECK:STDOUT: ret %type.26 %x, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CH.Main.c5e4ba542a56b71f(double %x) #0 !dbg !213 { +// CHECK:STDOUT: define linkonce_odr double @_CH.Main.c5e4ba542a56b71f(double %x) #0 !dbg !201 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !219 +// CHECK:STDOUT: ret double %x, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.a76b78461416b4a8(ptr %x) #0 !dbg !221 { +// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.a76b78461416b4a8(ptr %x) #0 !dbg !209 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !227 +// CHECK:STDOUT: ret ptr %x, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CH.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x) #0 !dbg !245 { +// CHECK:STDOUT: define linkonce_odr void @_CH.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x) #0 !dbg !233 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !250 -// CHECK:STDOUT: ret void, !dbg !251 +// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !238 +// CHECK:STDOUT: ret void, !dbg !239 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -360,135 +339,123 @@ fn M() { // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !35) // CHECK:STDOUT: !53 = !DILocation(line: 43, column: 3, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 43, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 43, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !58) // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !35) // CHECK:STDOUT: !57 = !DILocation(line: 43, column: 3, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 43, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 40, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !35) -// CHECK:STDOUT: !61 = !DILocation(line: 43, column: 3, scope: !59) +// CHECK:STDOUT: !61 = !DILocation(line: 40, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 40, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !35) -// CHECK:STDOUT: !65 = !DILocation(line: 40, column: 3, scope: !63) +// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 3, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 38, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !35) -// CHECK:STDOUT: !69 = !DILocation(line: 38, column: 3, scope: !67) +// CHECK:STDOUT: !69 = !DILocation(line: 36, column: 3, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !35) -// CHECK:STDOUT: !73 = !DILocation(line: 36, column: 3, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 34, column: 3, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !35) // CHECK:STDOUT: !77 = !DILocation(line: 34, column: 3, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !35) -// CHECK:STDOUT: !81 = !DILocation(line: 34, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 34, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !35) -// CHECK:STDOUT: !85 = !DILocation(line: 34, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !88 = !DILocation(line: 49, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !DILocation(line: 50, column: 3, scope: !87) -// CHECK:STDOUT: !92 = !DILocation(line: 52, column: 5, scope: !87) -// CHECK:STDOUT: !93 = !DILocation(line: 52, column: 3, scope: !87) -// CHECK:STDOUT: !94 = !DILocation(line: 53, column: 18, scope: !87) -// CHECK:STDOUT: !95 = !DILocation(line: 53, column: 16, scope: !87) -// CHECK:STDOUT: !96 = !{!34, !34} -// CHECK:STDOUT: !97 = !DISubroutineType(types: !96) -// CHECK:STDOUT: !100 = !DILocation(line: 54, column: 5, scope: !87) -// CHECK:STDOUT: !101 = !DILocation(line: 54, column: 3, scope: !87) -// CHECK:STDOUT: !102 = !DILocation(line: 55, column: 18, scope: !87) -// CHECK:STDOUT: !103 = !DILocation(line: 55, column: 16, scope: !87) -// CHECK:STDOUT: !106 = !DILocation(line: 48, column: 1, scope: !87) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !110) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !33) +// CHECK:STDOUT: !80 = !DILocation(line: 49, column: 3, scope: !79) +// CHECK:STDOUT: !82 = !DILocation(line: 50, column: 3, scope: !79) +// CHECK:STDOUT: !84 = !DILocation(line: 52, column: 5, scope: !79) +// CHECK:STDOUT: !85 = !DILocation(line: 52, column: 3, scope: !79) +// CHECK:STDOUT: !86 = !DILocation(line: 53, column: 18, scope: !79) +// CHECK:STDOUT: !87 = !DILocation(line: 53, column: 16, scope: !79) +// CHECK:STDOUT: !88 = !{!34, !34} +// CHECK:STDOUT: !89 = !DISubroutineType(types: !88) +// CHECK:STDOUT: !92 = !DILocation(line: 54, column: 5, scope: !79) +// CHECK:STDOUT: !93 = !DILocation(line: 54, column: 3, scope: !79) +// CHECK:STDOUT: !94 = !DILocation(line: 55, column: 18, scope: !79) +// CHECK:STDOUT: !95 = !DILocation(line: 55, column: 16, scope: !79) +// CHECK:STDOUT: !98 = !DILocation(line: 48, column: 1, scope: !79) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !34) +// CHECK:STDOUT: !101 = !DILocation(line: 53, column: 16, scope: !99) +// CHECK:STDOUT: !102 = !{!100} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !34) +// CHECK:STDOUT: !105 = !DILocation(line: 53, column: 16, scope: !103) +// CHECK:STDOUT: !106 = !{!104} +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 19, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !111) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !34) -// CHECK:STDOUT: !109 = !DILocation(line: 53, column: 16, scope: !107) -// CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !114) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !34) -// CHECK:STDOUT: !113 = !DILocation(line: 53, column: 16, scope: !111) -// CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 53, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !118) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !34) -// CHECK:STDOUT: !117 = !DILocation(line: 53, column: 16, scope: !115) -// CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !32, line: 19, type: !43, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !123) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !34) -// CHECK:STDOUT: !122 = !DILocation(line: 19, column: 1, scope: !119) -// CHECK:STDOUT: !123 = !{!120} -// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 28, type: !97, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !157) -// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !34) -// CHECK:STDOUT: !130 = !DILocation(line: 29, column: 3, scope: !124) -// CHECK:STDOUT: !131 = !DILocation(line: 30, column: 3, scope: !124) -// CHECK:STDOUT: !133 = !DILocation(line: 31, column: 5, scope: !124) -// CHECK:STDOUT: !134 = !DILocation(line: 31, column: 3, scope: !124) -// CHECK:STDOUT: !135 = !DILocation(line: 34, column: 3, scope: !124) -// CHECK:STDOUT: !137 = !DILocation(line: 35, column: 5, scope: !124) -// CHECK:STDOUT: !138 = !DILocation(line: 35, column: 3, scope: !124) -// CHECK:STDOUT: !139 = !DILocation(line: 36, column: 3, scope: !124) -// CHECK:STDOUT: !141 = !DILocation(line: 37, column: 5, scope: !124) -// CHECK:STDOUT: !142 = !DILocation(line: 37, column: 3, scope: !124) -// CHECK:STDOUT: !143 = !DILocation(line: 38, column: 3, scope: !124) -// CHECK:STDOUT: !145 = !DILocation(line: 39, column: 5, scope: !124) -// CHECK:STDOUT: !146 = !DILocation(line: 39, column: 3, scope: !124) -// CHECK:STDOUT: !147 = !DILocation(line: 40, column: 3, scope: !124) -// CHECK:STDOUT: !149 = !DILocation(line: 41, column: 5, scope: !124) -// CHECK:STDOUT: !150 = !DILocation(line: 41, column: 3, scope: !124) -// CHECK:STDOUT: !151 = !DILocation(line: 42, column: 3, scope: !124) -// CHECK:STDOUT: !154 = !DILocation(line: 43, column: 3, scope: !124) -// CHECK:STDOUT: !156 = !DILocation(line: 45, column: 3, scope: !124) -// CHECK:STDOUT: !157 = !{!125} -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 19, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !162) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !35) -// CHECK:STDOUT: !161 = !DILocation(line: 19, column: 1, scope: !158) -// CHECK:STDOUT: !162 = !{!159} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.cfa50e0c7743522e", scope: null, file: !32, line: 28, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !196) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !35) -// CHECK:STDOUT: !169 = !DILocation(line: 29, column: 3, scope: !163) -// CHECK:STDOUT: !170 = !DILocation(line: 30, column: 3, scope: !163) -// CHECK:STDOUT: !172 = !DILocation(line: 31, column: 5, scope: !163) -// CHECK:STDOUT: !173 = !DILocation(line: 31, column: 3, scope: !163) -// CHECK:STDOUT: !174 = !DILocation(line: 34, column: 3, scope: !163) -// CHECK:STDOUT: !176 = !DILocation(line: 35, column: 5, scope: !163) -// CHECK:STDOUT: !177 = !DILocation(line: 35, column: 3, scope: !163) -// CHECK:STDOUT: !178 = !DILocation(line: 36, column: 3, scope: !163) -// CHECK:STDOUT: !180 = !DILocation(line: 37, column: 5, scope: !163) -// CHECK:STDOUT: !181 = !DILocation(line: 37, column: 3, scope: !163) -// CHECK:STDOUT: !182 = !DILocation(line: 38, column: 3, scope: !163) -// CHECK:STDOUT: !184 = !DILocation(line: 39, column: 5, scope: !163) -// CHECK:STDOUT: !185 = !DILocation(line: 39, column: 3, scope: !163) -// CHECK:STDOUT: !186 = !DILocation(line: 40, column: 3, scope: !163) -// CHECK:STDOUT: !188 = !DILocation(line: 41, column: 5, scope: !163) -// CHECK:STDOUT: !189 = !DILocation(line: 41, column: 3, scope: !163) -// CHECK:STDOUT: !190 = !DILocation(line: 42, column: 3, scope: !163) -// CHECK:STDOUT: !193 = !DILocation(line: 43, column: 3, scope: !163) -// CHECK:STDOUT: !195 = !DILocation(line: 45, column: 3, scope: !163) -// CHECK:STDOUT: !196 = !{!164} -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !97, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !204) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !34) -// CHECK:STDOUT: !203 = !DILocation(line: 23, column: 3, scope: !197) -// CHECK:STDOUT: !204 = !{!198} -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !212) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !35) -// CHECK:STDOUT: !211 = !DILocation(line: 23, column: 3, scope: !205) -// CHECK:STDOUT: !212 = !{!206} -// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !220) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !35) -// CHECK:STDOUT: !219 = !DILocation(line: 23, column: 3, scope: !213) -// CHECK:STDOUT: !220 = !{!214} -// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.a76b78461416b4a8", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !228) -// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !35) -// CHECK:STDOUT: !227 = !DILocation(line: 23, column: 3, scope: !221) -// CHECK:STDOUT: !228 = !{!222} -// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !252) -// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !35) -// CHECK:STDOUT: !250 = !DILocation(line: 23, column: 10, scope: !245) -// CHECK:STDOUT: !251 = !DILocation(line: 23, column: 3, scope: !245) -// CHECK:STDOUT: !252 = !{!246} +// CHECK:STDOUT: !110 = !DILocation(line: 19, column: 1, scope: !107) +// CHECK:STDOUT: !111 = !{!108} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 28, type: !89, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !145) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !34) +// CHECK:STDOUT: !118 = !DILocation(line: 29, column: 3, scope: !112) +// CHECK:STDOUT: !119 = !DILocation(line: 30, column: 3, scope: !112) +// CHECK:STDOUT: !121 = !DILocation(line: 31, column: 5, scope: !112) +// CHECK:STDOUT: !122 = !DILocation(line: 31, column: 3, scope: !112) +// CHECK:STDOUT: !123 = !DILocation(line: 34, column: 3, scope: !112) +// CHECK:STDOUT: !125 = !DILocation(line: 35, column: 5, scope: !112) +// CHECK:STDOUT: !126 = !DILocation(line: 35, column: 3, scope: !112) +// CHECK:STDOUT: !127 = !DILocation(line: 36, column: 3, scope: !112) +// CHECK:STDOUT: !129 = !DILocation(line: 37, column: 5, scope: !112) +// CHECK:STDOUT: !130 = !DILocation(line: 37, column: 3, scope: !112) +// CHECK:STDOUT: !131 = !DILocation(line: 38, column: 3, scope: !112) +// CHECK:STDOUT: !133 = !DILocation(line: 39, column: 5, scope: !112) +// CHECK:STDOUT: !134 = !DILocation(line: 39, column: 3, scope: !112) +// CHECK:STDOUT: !135 = !DILocation(line: 40, column: 3, scope: !112) +// CHECK:STDOUT: !137 = !DILocation(line: 41, column: 5, scope: !112) +// CHECK:STDOUT: !138 = !DILocation(line: 41, column: 3, scope: !112) +// CHECK:STDOUT: !139 = !DILocation(line: 42, column: 3, scope: !112) +// CHECK:STDOUT: !142 = !DILocation(line: 43, column: 3, scope: !112) +// CHECK:STDOUT: !144 = !DILocation(line: 45, column: 3, scope: !112) +// CHECK:STDOUT: !145 = !{!113} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.073fbce68be6103e", scope: null, file: !32, line: 19, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !150) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !35) +// CHECK:STDOUT: !149 = !DILocation(line: 19, column: 1, scope: !146) +// CHECK:STDOUT: !150 = !{!147} +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.cfa50e0c7743522e", scope: null, file: !32, line: 28, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !184) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !35) +// CHECK:STDOUT: !157 = !DILocation(line: 29, column: 3, scope: !151) +// CHECK:STDOUT: !158 = !DILocation(line: 30, column: 3, scope: !151) +// CHECK:STDOUT: !160 = !DILocation(line: 31, column: 5, scope: !151) +// CHECK:STDOUT: !161 = !DILocation(line: 31, column: 3, scope: !151) +// CHECK:STDOUT: !162 = !DILocation(line: 34, column: 3, scope: !151) +// CHECK:STDOUT: !164 = !DILocation(line: 35, column: 5, scope: !151) +// CHECK:STDOUT: !165 = !DILocation(line: 35, column: 3, scope: !151) +// CHECK:STDOUT: !166 = !DILocation(line: 36, column: 3, scope: !151) +// CHECK:STDOUT: !168 = !DILocation(line: 37, column: 5, scope: !151) +// CHECK:STDOUT: !169 = !DILocation(line: 37, column: 3, scope: !151) +// CHECK:STDOUT: !170 = !DILocation(line: 38, column: 3, scope: !151) +// CHECK:STDOUT: !172 = !DILocation(line: 39, column: 5, scope: !151) +// CHECK:STDOUT: !173 = !DILocation(line: 39, column: 3, scope: !151) +// CHECK:STDOUT: !174 = !DILocation(line: 40, column: 3, scope: !151) +// CHECK:STDOUT: !176 = !DILocation(line: 41, column: 5, scope: !151) +// CHECK:STDOUT: !177 = !DILocation(line: 41, column: 3, scope: !151) +// CHECK:STDOUT: !178 = !DILocation(line: 42, column: 3, scope: !151) +// CHECK:STDOUT: !181 = !DILocation(line: 43, column: 3, scope: !151) +// CHECK:STDOUT: !183 = !DILocation(line: 45, column: 3, scope: !151) +// CHECK:STDOUT: !184 = !{!152} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !89, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !192) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !34) +// CHECK:STDOUT: !191 = !DILocation(line: 23, column: 3, scope: !185) +// CHECK:STDOUT: !192 = !{!186} +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !200) +// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !35) +// CHECK:STDOUT: !199 = !DILocation(line: 23, column: 3, scope: !193) +// CHECK:STDOUT: !200 = !{!194} +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !208) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !35) +// CHECK:STDOUT: !207 = !DILocation(line: 23, column: 3, scope: !201) +// CHECK:STDOUT: !208 = !{!202} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.a76b78461416b4a8", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !216) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !35) +// CHECK:STDOUT: !215 = !DILocation(line: 23, column: 3, scope: !209) +// CHECK:STDOUT: !216 = !{!210} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !32, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !240) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !35) +// CHECK:STDOUT: !238 = !DILocation(line: 23, column: 10, scope: !233) +// CHECK:STDOUT: !239 = !DILocation(line: 23, column: 3, scope: !233) +// CHECK:STDOUT: !240 = !{!234} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon index 0f5b84fee36e..883288f7876b 100644 --- a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon @@ -67,44 +67,37 @@ fn M() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !53 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %_) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !58 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d9f279dbc2b9f6f(i32 %x) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !64 -// CHECK:STDOUT: %H.call = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !64 -// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc25_6.3.temp), !dbg !64 -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !66 -// CHECK:STDOUT: ret i32 %x, !dbg !68 +// CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !60 +// CHECK:STDOUT: %H.call = call i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x), !dbg !60 +// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !60 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc25_6.3.temp), !dbg !60 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !62 +// CHECK:STDOUT: ret i32 %x, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !70 { +// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !76 -// CHECK:STDOUT: ret i32 %x, !dbg !78 +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !72 +// CHECK:STDOUT: ret i32 %x, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -142,27 +135,23 @@ fn M() -> i32 { // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 35, column: 7, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 35, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 35, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) // CHECK:STDOUT: !47 = !DILocation(line: 35, column: 7, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 35, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) -// CHECK:STDOUT: !51 = !DILocation(line: 35, column: 7, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 1, scope: !53) -// CHECK:STDOUT: !57 = !{!54} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !18, line: 24, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) -// CHECK:STDOUT: !64 = !DILocation(line: 25, column: 3, scope: !58) -// CHECK:STDOUT: !66 = !DILocation(line: 26, column: 3, scope: !58) -// CHECK:STDOUT: !68 = !DILocation(line: 27, column: 3, scope: !58) -// CHECK:STDOUT: !69 = !{!59} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !18, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !20) -// CHECK:STDOUT: !76 = !DILocation(line: 20, column: 3, scope: !70) -// CHECK:STDOUT: !78 = !DILocation(line: 21, column: 3, scope: !70) -// CHECK:STDOUT: !79 = !{!71} +// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 1, scope: !49) +// CHECK:STDOUT: !53 = !{!50} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d9f279dbc2b9f6f", scope: null, file: !18, line: 24, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) +// CHECK:STDOUT: !60 = !DILocation(line: 25, column: 3, scope: !54) +// CHECK:STDOUT: !62 = !DILocation(line: 26, column: 3, scope: !54) +// CHECK:STDOUT: !64 = !DILocation(line: 27, column: 3, scope: !54) +// CHECK:STDOUT: !65 = !{!55} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.4d6ceefeb7f772f4", scope: null, file: !18, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !20) +// CHECK:STDOUT: !72 = !DILocation(line: 20, column: 3, scope: !66) +// CHECK:STDOUT: !74 = !DILocation(line: 21, column: 3, scope: !66) +// CHECK:STDOUT: !75 = !{!67} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon index ef18dbbb9901..3ef8a5deeeb0 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -71,108 +71,94 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !76 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !78 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !80 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !82 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !84 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !87 -// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !91 +// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !79 +// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !83 +// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !86 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !89 +// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !91 // CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !94 { +// CHECK:STDOUT: define linkonce_odr %type.26 @_CA.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !94 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.26 @_CA.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !97 -// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: ret %type.26 %x, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CA.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !102 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !108 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !107 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !107 +// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !106 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc27_5.2), !dbg !107 +// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !107 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !110 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !115 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !115 -// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !114 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc27_5.2), !dbg !115 -// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !115 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !115 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !117 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !117 +// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !116 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc27_5.2), !dbg !117 +// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !117 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !117 // CHECK:STDOUT: ret void, !dbg !118 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !120 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !120 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !125 -// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !124 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc27_5.2), !dbg !125 -// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !126 +// CHECK:STDOUT: ret i32 %x, !dbg !126 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !128 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !134 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !136 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !142 +// CHECK:STDOUT: ret double %x, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -209,72 +195,64 @@ fn M() { // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !34) // CHECK:STDOUT: !54 = !DILocation(line: 39, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !34) // CHECK:STDOUT: !58 = !DILocation(line: 39, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !34) -// CHECK:STDOUT: !62 = !DILocation(line: 39, column: 3, scope: !60) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !63) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !39) +// CHECK:STDOUT: !62 = !DILocation(line: 40, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !39) // CHECK:STDOUT: !66 = !DILocation(line: 40, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 37, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !71) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) -// CHECK:STDOUT: !70 = !DILocation(line: 40, column: 3, scope: !68) +// CHECK:STDOUT: !70 = !DILocation(line: 37, column: 3, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !39) -// CHECK:STDOUT: !74 = !DILocation(line: 40, column: 3, scope: !72) +// CHECK:STDOUT: !74 = !DILocation(line: 36, column: 3, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 37, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !85) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !39) -// CHECK:STDOUT: !78 = !DILocation(line: 37, column: 3, scope: !76) -// CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 36, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !83) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !39) -// CHECK:STDOUT: !82 = !DILocation(line: 36, column: 3, scope: !80) -// CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !93) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !39) -// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 3, scope: !84) -// CHECK:STDOUT: !88 = !{!39, !39} -// CHECK:STDOUT: !89 = !DISubroutineType(types: !88) -// CHECK:STDOUT: !91 = !DILocation(line: 32, column: 3, scope: !84) -// CHECK:STDOUT: !92 = !DILocation(line: 30, column: 1, scope: !84) -// CHECK:STDOUT: !93 = !{!85} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !101) +// CHECK:STDOUT: !79 = !DILocation(line: 31, column: 3, scope: !76) +// CHECK:STDOUT: !80 = !{!39, !39} +// CHECK:STDOUT: !81 = !DISubroutineType(types: !80) +// CHECK:STDOUT: !83 = !DILocation(line: 32, column: 3, scope: !76) +// CHECK:STDOUT: !84 = !DILocation(line: 30, column: 1, scope: !76) +// CHECK:STDOUT: !85 = !{!77} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !32, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !93) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !39) +// CHECK:STDOUT: !89 = !DILocation(line: 31, column: 3, scope: !86) +// CHECK:STDOUT: !91 = !DILocation(line: 32, column: 3, scope: !86) +// CHECK:STDOUT: !92 = !DILocation(line: 30, column: 1, scope: !86) +// CHECK:STDOUT: !93 = !{!87} +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !81, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !101) // CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !39) -// CHECK:STDOUT: !97 = !DILocation(line: 31, column: 3, scope: !94) -// CHECK:STDOUT: !99 = !DILocation(line: 32, column: 3, scope: !94) -// CHECK:STDOUT: !100 = !DILocation(line: 30, column: 1, scope: !94) +// CHECK:STDOUT: !100 = !DILocation(line: 19, column: 3, scope: !94) // CHECK:STDOUT: !101 = !{!95} -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !89, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !109) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !111) // CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !39) -// CHECK:STDOUT: !108 = !DILocation(line: 19, column: 3, scope: !102) -// CHECK:STDOUT: !109 = !{!103} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !119) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !39) -// CHECK:STDOUT: !114 = !DILocation(line: 27, column: 5, scope: !110) -// CHECK:STDOUT: !115 = !DILocation(line: 27, column: 3, scope: !110) -// CHECK:STDOUT: !116 = !{!34, !34} -// CHECK:STDOUT: !117 = !DISubroutineType(types: !116) -// CHECK:STDOUT: !118 = !DILocation(line: 26, column: 1, scope: !110) -// CHECK:STDOUT: !119 = !{!111} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !127) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !39) -// CHECK:STDOUT: !124 = !DILocation(line: 27, column: 5, scope: !120) -// CHECK:STDOUT: !125 = !DILocation(line: 27, column: 3, scope: !120) -// CHECK:STDOUT: !126 = !DILocation(line: 26, column: 1, scope: !120) +// CHECK:STDOUT: !106 = !DILocation(line: 27, column: 5, scope: !102) +// CHECK:STDOUT: !107 = !DILocation(line: 27, column: 3, scope: !102) +// CHECK:STDOUT: !108 = !{!34, !34} +// CHECK:STDOUT: !109 = !DISubroutineType(types: !108) +// CHECK:STDOUT: !110 = !DILocation(line: 26, column: 1, scope: !102) +// CHECK:STDOUT: !111 = !{!103} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !32, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !119) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !39) +// CHECK:STDOUT: !116 = !DILocation(line: 27, column: 5, scope: !112) +// CHECK:STDOUT: !117 = !DILocation(line: 27, column: 3, scope: !112) +// CHECK:STDOUT: !118 = !DILocation(line: 26, column: 1, scope: !112) +// CHECK:STDOUT: !119 = !{!113} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !109, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !127) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !34) +// CHECK:STDOUT: !126 = !DILocation(line: 23, column: 3, scope: !120) // CHECK:STDOUT: !127 = !{!121} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 22, type: !117, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !135) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !34) +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !81, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !135) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !39) // CHECK:STDOUT: !134 = !DILocation(line: 23, column: 3, scope: !128) // CHECK:STDOUT: !135 = !{!129} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 22, type: !89, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !143) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !39) -// CHECK:STDOUT: !142 = !DILocation(line: 23, column: 3, scope: !136) -// CHECK:STDOUT: !143 = !{!137} // CHECK:STDOUT: 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 e9cd247fdbcf..bb7f6e685e55 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 @@ -69,59 +69,52 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !29 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !29 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !33 { +// CHECK:STDOUT: define i32 @"_CF.Y.Main:I.Main"() #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !35 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !36 +// CHECK:STDOUT: ret i32 2, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CF.Y.Main:I.Main"() #0 !dbg !37 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !40 -// CHECK:STDOUT: ret i32 2, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.d0cc85b6c89517e3(), !dbg !43 -// CHECK:STDOUT: call void @_CG.Main.e8d4d639bae9ba40(), !dbg !46 -// CHECK:STDOUT: ret i32 0, !dbg !47 +// CHECK:STDOUT: call void @_CG.Main.d0cc85b6c89517e3(), !dbg !39 +// CHECK:STDOUT: call void @_CG.Main.e8d4d639bae9ba40(), !dbg !42 +// CHECK:STDOUT: ret i32 0, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.d0cc85b6c89517e3() #0 !dbg !48 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.d0cc85b6c89517e3() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_20.1.temp = alloca i1, align 1, !dbg !49 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !49 -// CHECK:STDOUT: %I.WithSelf.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !49 -// CHECK:STDOUT: %.loc38_20.2 = zext i1 %I.WithSelf.F.call to i8, !dbg !49 -// CHECK:STDOUT: store i8 %.loc38_20.2, ptr %.loc38_20.1.temp, align 1, !dbg !49 -// CHECK:STDOUT: %.loc38_20.3 = load i8, ptr %.loc38_20.1.temp, align 1, !dbg !49 -// CHECK:STDOUT: %.loc38_20.31 = trunc i8 %.loc38_20.3 to i1, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: %.loc38_20.1.temp = alloca i1, align 1, !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !45 +// CHECK:STDOUT: %I.WithSelf.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !45 +// CHECK:STDOUT: %.loc38_20.2 = zext i1 %I.WithSelf.F.call to i8, !dbg !45 +// CHECK:STDOUT: store i8 %.loc38_20.2, ptr %.loc38_20.1.temp, align 1, !dbg !45 +// CHECK:STDOUT: %.loc38_20.3 = load i8, ptr %.loc38_20.1.temp, align 1, !dbg !45 +// CHECK:STDOUT: %.loc38_20.31 = trunc i8 %.loc38_20.3 to i1, !dbg !45 +// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e8d4d639bae9ba40() #0 !dbg !53 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e8d4d639bae9ba40() #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_20.1.temp = alloca i32, align 4, !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !54 -// CHECK:STDOUT: %I.WithSelf.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !54 -// CHECK:STDOUT: store i32 %I.WithSelf.F.call, ptr %.loc38_20.1.temp, align 4, !dbg !54 -// CHECK:STDOUT: %.loc38_20.3 = load i32, ptr %.loc38_20.1.temp, align 4, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: %.loc38_20.1.temp = alloca i32, align 4, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !50 +// CHECK:STDOUT: %I.WithSelf.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !50 +// CHECK:STDOUT: store i32 %I.WithSelf.F.call, ptr %.loc38_20.1.temp, align 4, !dbg !50 +// CHECK:STDOUT: %.loc38_20.3 = load i32, ptr %.loc38_20.1.temp, align 4, !dbg !50 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -162,27 +155,23 @@ fn Run() { // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !6) // CHECK:STDOUT: !27 = !DILocation(line: 28, column: 24, scope: !25) // CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 28, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 28, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !6) // CHECK:STDOUT: !31 = !DILocation(line: 28, column: 24, scope: !29) // CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 28, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) -// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !6) -// CHECK:STDOUT: !35 = !DILocation(line: 28, column: 24, scope: !33) -// CHECK:STDOUT: !36 = !{!34} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !40 = !DILocation(line: 30, column: 5, scope: !37) -// CHECK:STDOUT: !41 = !DILocation(line: 31, column: 5, scope: !37) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 41, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !43 = !DILocation(line: 42, column: 3, scope: !42) -// CHECK:STDOUT: !44 = !{null} -// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 43, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 41, column: 1, scope: !42) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d0cc85b6c89517e3", scope: null, file: !4, line: 37, type: !45, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !49 = !DILocation(line: 38, column: 16, scope: !48) -// CHECK:STDOUT: !52 = !DILocation(line: 37, column: 1, scope: !48) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e8d4d639bae9ba40", scope: null, file: !4, line: 37, type: !45, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !54 = !DILocation(line: 38, column: 16, scope: !53) -// CHECK:STDOUT: !57 = !DILocation(line: 37, column: 1, scope: !53) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !36 = !DILocation(line: 30, column: 5, scope: !33) +// CHECK:STDOUT: !37 = !DILocation(line: 31, column: 5, scope: !33) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 41, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !39 = !DILocation(line: 42, column: 3, scope: !38) +// CHECK:STDOUT: !40 = !{null} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = !DILocation(line: 43, column: 3, scope: !38) +// CHECK:STDOUT: !43 = !DILocation(line: 41, column: 1, scope: !38) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d0cc85b6c89517e3", scope: null, file: !4, line: 37, type: !41, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !45 = !DILocation(line: 38, column: 16, scope: !44) +// CHECK:STDOUT: !48 = !DILocation(line: 37, column: 1, scope: !44) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e8d4d639bae9ba40", scope: null, file: !4, line: 37, type: !41, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !50 = !DILocation(line: 38, column: 16, scope: !49) +// CHECK:STDOUT: !53 = !DILocation(line: 37, column: 1, scope: !49) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_different_specific.carbon b/toolchain/lower/testdata/function/generic/call_different_specific.carbon index 78f775531851..30c6b1107fb1 100644 --- a/toolchain/lower/testdata/function/generic/call_different_specific.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_specific.carbon @@ -65,96 +65,82 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !29 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !29 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !33 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !35 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !37 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !43 +// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !44 +// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !52 -// CHECK:STDOUT: call void @_CB.Main.4d9f279dbc2b9f6f(ptr %x), !dbg !56 +// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !54 +// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !56 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !59 { +// CHECK:STDOUT: define linkonce_odr %type.0 @_CA.Main.c3359c2c217ad593(%type.0 %x) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !62 -// CHECK:STDOUT: call void @_CB.Main.cfa50e0c7743522e(ptr %x), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: ret %type.0 %x, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.0 @_CA.Main.c3359c2c217ad593(%type.0 %x) #0 !dbg !67 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.0 %x, !dbg !73 +// CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !72 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !72 +// CHECK:STDOUT: %.loc34_5.2 = load i32, ptr %x, align 4, !dbg !71 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc34_5.2), !dbg !72 +// CHECK:STDOUT: store i32 %D.call, ptr %.loc34_7.3.temp, align 4, !dbg !72 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d9f279dbc2b9f6f(ptr %x) #0 !dbg !75 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !80 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !80 -// CHECK:STDOUT: %.loc34_5.2 = load i32, ptr %x, align 4, !dbg !79 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %.loc34_5.2), !dbg !80 -// CHECK:STDOUT: store i32 %D.call, ptr %.loc34_7.3.temp, align 4, !dbg !80 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !80 +// CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !82 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !82 +// CHECK:STDOUT: %.loc34_5.2 = load double, ptr %x, align 8, !dbg !81 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc34_5.2), !dbg !82 +// CHECK:STDOUT: store double %D.call, ptr %.loc34_7.3.temp, align 8, !dbg !82 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !82 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.cfa50e0c7743522e(ptr %x) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !90 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !90 -// CHECK:STDOUT: %.loc34_5.2 = load double, ptr %x, align 8, !dbg !89 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %.loc34_5.2), !dbg !90 -// CHECK:STDOUT: store double %D.call, ptr %.loc34_7.3.temp, align 8, !dbg !90 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !90 -// CHECK:STDOUT: ret void, !dbg !91 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !93 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !99 +// CHECK:STDOUT: ret i32 %x, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !101 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !107 +// CHECK:STDOUT: ret double %x, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -190,64 +176,56 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !6) // CHECK:STDOUT: !27 = !DILocation(line: 43, column: 3, scope: !25) // CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 43, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 43, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !6) // CHECK:STDOUT: !31 = !DILocation(line: 43, column: 3, scope: !29) // CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 43, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) -// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !6) -// CHECK:STDOUT: !35 = !DILocation(line: 43, column: 3, scope: !33) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !36) +// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !7) +// CHECK:STDOUT: !35 = !DILocation(line: 44, column: 3, scope: !33) // CHECK:STDOUT: !36 = !{!34} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !39 = !DILocation(line: 44, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !7) -// CHECK:STDOUT: !43 = !DILocation(line: 44, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !7) -// CHECK:STDOUT: !47 = !DILocation(line: 44, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d9f279dbc2b9f6f", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !7) -// CHECK:STDOUT: !52 = !DILocation(line: 38, column: 3, scope: !49) -// CHECK:STDOUT: !53 = !{!7, !7} -// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !49) -// CHECK:STDOUT: !57 = !DILocation(line: 37, column: 1, scope: !49) -// CHECK:STDOUT: !58 = !{!50} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !44 = !DILocation(line: 38, column: 3, scope: !41) +// CHECK:STDOUT: !45 = !{!7, !7} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !48 = !DILocation(line: 39, column: 3, scope: !41) +// CHECK:STDOUT: !49 = !DILocation(line: 37, column: 1, scope: !41) +// CHECK:STDOUT: !50 = !{!42} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cfa50e0c7743522e", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) +// CHECK:STDOUT: !54 = !DILocation(line: 38, column: 3, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !51) +// CHECK:STDOUT: !57 = !DILocation(line: 37, column: 1, scope: !51) +// CHECK:STDOUT: !58 = !{!52} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !4, line: 25, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !7) -// CHECK:STDOUT: !62 = !DILocation(line: 38, column: 3, scope: !59) -// CHECK:STDOUT: !64 = !DILocation(line: 39, column: 3, scope: !59) -// CHECK:STDOUT: !65 = !DILocation(line: 37, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !DILocation(line: 26, column: 3, scope: !59) // CHECK:STDOUT: !66 = !{!60} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !4, line: 25, type: !54, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !7) -// CHECK:STDOUT: !73 = !DILocation(line: 26, column: 3, scope: !67) -// CHECK:STDOUT: !74 = !{!68} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d9f279dbc2b9f6f", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !7) -// CHECK:STDOUT: !79 = !DILocation(line: 34, column: 5, scope: !75) -// CHECK:STDOUT: !80 = !DILocation(line: 34, column: 3, scope: !75) -// CHECK:STDOUT: !81 = !{!6, !6} -// CHECK:STDOUT: !82 = !DISubroutineType(types: !81) -// CHECK:STDOUT: !83 = !DILocation(line: 33, column: 1, scope: !75) -// CHECK:STDOUT: !84 = !{!76} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) -// CHECK:STDOUT: !89 = !DILocation(line: 34, column: 5, scope: !85) -// CHECK:STDOUT: !90 = !DILocation(line: 34, column: 3, scope: !85) -// CHECK:STDOUT: !91 = !DILocation(line: 33, column: 1, scope: !85) +// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 5, scope: !67) +// CHECK:STDOUT: !72 = !DILocation(line: 34, column: 3, scope: !67) +// CHECK:STDOUT: !73 = !{!6, !6} +// CHECK:STDOUT: !74 = !DISubroutineType(types: !73) +// CHECK:STDOUT: !75 = !DILocation(line: 33, column: 1, scope: !67) +// CHECK:STDOUT: !76 = !{!68} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.cfa50e0c7743522e", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) +// CHECK:STDOUT: !81 = !DILocation(line: 34, column: 5, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 34, column: 3, scope: !77) +// CHECK:STDOUT: !83 = !DILocation(line: 33, column: 1, scope: !77) +// CHECK:STDOUT: !84 = !{!78} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 29, type: !74, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !6) +// CHECK:STDOUT: !91 = !DILocation(line: 30, column: 3, scope: !85) // CHECK:STDOUT: !92 = !{!86} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 29, type: !82, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !6) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 29, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !7) // CHECK:STDOUT: !99 = !DILocation(line: 30, column: 3, scope: !93) // CHECK:STDOUT: !100 = !{!94} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 29, type: !54, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !7) -// CHECK:STDOUT: !107 = !DILocation(line: 30, column: 3, scope: !101) -// CHECK:STDOUT: !108 = !{!102} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index 395e54fff2af..62c5516f682c 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -51,37 +51,23 @@ fn CallF() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !58 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -89,9 +75,9 @@ fn CallF() -> i32 { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !64 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !72 +// CHECK:STDOUT: ret i32 %x, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -127,29 +113,21 @@ fn CallF() -> i32 { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 21, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 21, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 21, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 21, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 21, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) -// CHECK:STDOUT: !50 = !DILocation(line: 21, column: 3, scope: !48) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !25) +// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !25) // CHECK:STDOUT: !54 = !DILocation(line: 20, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.4d6ceefeb7f772f4", scope: null, file: !18, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !25) -// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !25) -// CHECK:STDOUT: !62 = !DILocation(line: 20, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.4d6ceefeb7f772f4", scope: null, file: !18, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !25) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 2, scope: !64, type: !20) -// CHECK:STDOUT: !72 = !DILocation(line: 15, column: 5, scope: !64) -// CHECK:STDOUT: !73 = !{!65, !66} +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !56, type: !20) +// CHECK:STDOUT: !64 = !DILocation(line: 15, column: 5, scope: !56) +// CHECK:STDOUT: !65 = !{!57, !58} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon index 3b5c5f8072b6..edd1478e5cd0 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon @@ -98,68 +98,47 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !63 // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !83 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !87 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !91 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !95 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -167,64 +146,64 @@ fn M() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !97 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !104 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !105 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !92 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !93 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !107 +// CHECK:STDOUT: ret i32 %x, !dbg !95 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !109 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !110 -// CHECK:STDOUT: ret i32 %F.call, !dbg !111 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !97 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !98 +// CHECK:STDOUT: ret i32 %F.call, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !113 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !120 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !121 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !108 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !109 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !123 +// CHECK:STDOUT: ret double %x, !dbg !111 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !125 -// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !126 -// CHECK:STDOUT: ret double %F.call, !dbg !127 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !113 +// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !114 +// CHECK:STDOUT: ret double %F.call, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !129 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !117 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !136 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !137 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !124 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !125 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !139 +// CHECK:STDOUT: ret ptr %x, !dbg !127 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !141 -// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !142 -// CHECK:STDOUT: ret ptr %F.call, !dbg !143 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !129 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !130 +// CHECK:STDOUT: ret ptr %F.call, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x, i32 %count) #0 !dbg !161 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x, i32 %count) #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !168 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !169 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !156 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !157 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !158 +// CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !173 -// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %return, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !174 -// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !161 +// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %return, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -281,85 +260,73 @@ fn M() { // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !7) // CHECK:STDOUT: !55 = !DILocation(line: 40, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !7) // CHECK:STDOUT: !59 = !DILocation(line: 40, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !64) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !4, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !64) // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !7) -// CHECK:STDOUT: !63 = !DILocation(line: 40, column: 3, scope: !61) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 3, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !4, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !4, line: 31, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !7) -// CHECK:STDOUT: !67 = !DILocation(line: 32, column: 3, scope: !65) +// CHECK:STDOUT: !67 = !DILocation(line: 31, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !4, line: 31, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !7) -// CHECK:STDOUT: !71 = !DILocation(line: 31, column: 3, scope: !69) +// CHECK:STDOUT: !71 = !DILocation(line: 30, column: 3, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !75 = !DILocation(line: 30, column: 3, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) -// CHECK:STDOUT: !79 = !DILocation(line: 30, column: 3, scope: !77) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !6) +// CHECK:STDOUT: !79 = !DILocation(line: 29, column: 3, scope: !77) // CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !7) -// CHECK:STDOUT: !83 = !DILocation(line: 30, column: 3, scope: !81) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !6) +// CHECK:STDOUT: !83 = !DILocation(line: 29, column: 3, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !6) -// CHECK:STDOUT: !87 = !DILocation(line: 29, column: 3, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !6) -// CHECK:STDOUT: !91 = !DILocation(line: 29, column: 3, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !6) -// CHECK:STDOUT: !95 = !DILocation(line: 29, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !6) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 2, scope: !97, type: !6) -// CHECK:STDOUT: !104 = !DILocation(line: 22, column: 7, scope: !97) -// CHECK:STDOUT: !105 = !DILocation(line: 22, column: 6, scope: !97) -// CHECK:STDOUT: !107 = !DILocation(line: 23, column: 5, scope: !97) -// CHECK:STDOUT: !109 = !DILocation(line: 25, column: 15, scope: !97) -// CHECK:STDOUT: !110 = !DILocation(line: 25, column: 10, scope: !97) -// CHECK:STDOUT: !111 = !DILocation(line: 25, column: 3, scope: !97) -// CHECK:STDOUT: !112 = !{!98, !99} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !7) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 2, scope: !113, type: !6) -// CHECK:STDOUT: !120 = !DILocation(line: 22, column: 7, scope: !113) -// CHECK:STDOUT: !121 = !DILocation(line: 22, column: 6, scope: !113) -// CHECK:STDOUT: !123 = !DILocation(line: 23, column: 5, scope: !113) -// CHECK:STDOUT: !125 = !DILocation(line: 25, column: 15, scope: !113) -// CHECK:STDOUT: !126 = !DILocation(line: 25, column: 10, scope: !113) -// CHECK:STDOUT: !127 = !DILocation(line: 25, column: 3, scope: !113) -// CHECK:STDOUT: !128 = !{!114, !115} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !7) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 2, scope: !129, type: !6) -// CHECK:STDOUT: !136 = !DILocation(line: 22, column: 7, scope: !129) -// CHECK:STDOUT: !137 = !DILocation(line: 22, column: 6, scope: !129) -// CHECK:STDOUT: !139 = !DILocation(line: 23, column: 5, scope: !129) -// CHECK:STDOUT: !141 = !DILocation(line: 25, column: 15, scope: !129) -// CHECK:STDOUT: !142 = !DILocation(line: 25, column: 10, scope: !129) -// CHECK:STDOUT: !143 = !DILocation(line: 25, column: 3, scope: !129) -// CHECK:STDOUT: !144 = !{!130, !131} -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42513763e01cba2c", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !176) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !7) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 2, scope: !161, type: !6) -// CHECK:STDOUT: !168 = !DILocation(line: 22, column: 7, scope: !161) -// CHECK:STDOUT: !169 = !DILocation(line: 22, column: 6, scope: !161) -// CHECK:STDOUT: !170 = !DILocation(line: 23, column: 12, scope: !161) -// CHECK:STDOUT: !171 = !DILocation(line: 23, column: 5, scope: !161) -// CHECK:STDOUT: !173 = !DILocation(line: 25, column: 15, scope: !161) -// CHECK:STDOUT: !174 = !DILocation(line: 25, column: 10, scope: !161) -// CHECK:STDOUT: !175 = !DILocation(line: 25, column: 3, scope: !161) -// CHECK:STDOUT: !176 = !{!162, !163} +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 2, scope: !85, type: !6) +// CHECK:STDOUT: !92 = !DILocation(line: 22, column: 7, scope: !85) +// CHECK:STDOUT: !93 = !DILocation(line: 22, column: 6, scope: !85) +// CHECK:STDOUT: !95 = !DILocation(line: 23, column: 5, scope: !85) +// CHECK:STDOUT: !97 = !DILocation(line: 25, column: 15, scope: !85) +// CHECK:STDOUT: !98 = !DILocation(line: 25, column: 10, scope: !85) +// CHECK:STDOUT: !99 = !DILocation(line: 25, column: 3, scope: !85) +// CHECK:STDOUT: !100 = !{!86, !87} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !116) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !7) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 2, scope: !101, type: !6) +// CHECK:STDOUT: !108 = !DILocation(line: 22, column: 7, scope: !101) +// CHECK:STDOUT: !109 = !DILocation(line: 22, column: 6, scope: !101) +// CHECK:STDOUT: !111 = !DILocation(line: 23, column: 5, scope: !101) +// CHECK:STDOUT: !113 = !DILocation(line: 25, column: 15, scope: !101) +// CHECK:STDOUT: !114 = !DILocation(line: 25, column: 10, scope: !101) +// CHECK:STDOUT: !115 = !DILocation(line: 25, column: 3, scope: !101) +// CHECK:STDOUT: !116 = !{!102, !103} +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !7) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 2, scope: !117, type: !6) +// CHECK:STDOUT: !124 = !DILocation(line: 22, column: 7, scope: !117) +// CHECK:STDOUT: !125 = !DILocation(line: 22, column: 6, scope: !117) +// CHECK:STDOUT: !127 = !DILocation(line: 23, column: 5, scope: !117) +// CHECK:STDOUT: !129 = !DILocation(line: 25, column: 15, scope: !117) +// CHECK:STDOUT: !130 = !DILocation(line: 25, column: 10, scope: !117) +// CHECK:STDOUT: !131 = !DILocation(line: 25, column: 3, scope: !117) +// CHECK:STDOUT: !132 = !{!118, !119} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42513763e01cba2c", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !7) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 2, scope: !149, type: !6) +// CHECK:STDOUT: !156 = !DILocation(line: 22, column: 7, scope: !149) +// CHECK:STDOUT: !157 = !DILocation(line: 22, column: 6, scope: !149) +// CHECK:STDOUT: !158 = !DILocation(line: 23, column: 12, scope: !149) +// CHECK:STDOUT: !159 = !DILocation(line: 23, column: 5, scope: !149) +// CHECK:STDOUT: !161 = !DILocation(line: 25, column: 15, scope: !149) +// CHECK:STDOUT: !162 = !DILocation(line: 25, column: 10, scope: !149) +// CHECK:STDOUT: !163 = !DILocation(line: 25, column: 3, scope: !149) +// CHECK:STDOUT: !164 = !{!150, !151} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon index 0063accf24a3..d833cb3ad4f5 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon @@ -112,181 +112,167 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !72 { +// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !79 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !80 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !71 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !72 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !82 +// CHECK:STDOUT: ret i32 %x, !dbg !74 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !83 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !83 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !84 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !75 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !75 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !76 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call i32 @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !87 -// CHECK:STDOUT: ret i32 %B.call, !dbg !88 +// CHECK:STDOUT: %B.call = call i32 @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !79 +// CHECK:STDOUT: ret i32 %B.call, !dbg !80 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call i32 @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !91 -// CHECK:STDOUT: ret i32 %C.call, !dbg !92 +// CHECK:STDOUT: %C.call = call i32 @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !83 +// CHECK:STDOUT: ret i32 %C.call, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !94 { +// CHECK:STDOUT: define linkonce_odr double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !101 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !102 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !93 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !94 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !104 +// CHECK:STDOUT: ret double %x, !dbg !96 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !105 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !105 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !106 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !97 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !97 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !98 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call double @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !109 -// CHECK:STDOUT: ret double %B.call, !dbg !110 +// CHECK:STDOUT: %B.call = call double @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !101 +// CHECK:STDOUT: ret double %B.call, !dbg !102 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call double @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !113 -// CHECK:STDOUT: ret double %C.call, !dbg !114 +// CHECK:STDOUT: %C.call = call double @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !105 +// CHECK:STDOUT: ret double %C.call, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !116 { +// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !123 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !124 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !115 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !116 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !126 +// CHECK:STDOUT: ret ptr %x, !dbg !118 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !127 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !127 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !128 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !119 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !119 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !120 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call ptr @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !131 -// CHECK:STDOUT: ret ptr %B.call, !dbg !132 +// CHECK:STDOUT: %B.call = call ptr @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !123 +// CHECK:STDOUT: ret ptr %B.call, !dbg !124 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call ptr @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !135 -// CHECK:STDOUT: ret ptr %C.call, !dbg !136 +// CHECK:STDOUT: %C.call = call ptr @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !127 +// CHECK:STDOUT: ret ptr %C.call, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !160 { +// CHECK:STDOUT: define linkonce_odr i32 @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !152 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !167 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !170 -// CHECK:STDOUT: ret i32 %D.call, !dbg !171 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !159 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !162 +// CHECK:STDOUT: ret i32 %D.call, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !173 { +// CHECK:STDOUT: define linkonce_odr i32 @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !180 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !183 -// CHECK:STDOUT: ret i32 %D.call, !dbg !184 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !172 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !175 +// CHECK:STDOUT: ret i32 %D.call, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !186 { +// CHECK:STDOUT: define linkonce_odr double @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !178 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !193 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !196 -// CHECK:STDOUT: ret double %D.call, !dbg !197 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !185 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !188 +// CHECK:STDOUT: ret double %D.call, !dbg !189 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !199 { +// CHECK:STDOUT: define linkonce_odr double @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !191 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !206 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !209 -// CHECK:STDOUT: ret double %D.call, !dbg !210 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !198 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !201 +// CHECK:STDOUT: ret double %D.call, !dbg !202 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !212 { +// CHECK:STDOUT: define linkonce_odr ptr @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !204 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !219 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !222 -// CHECK:STDOUT: ret ptr %D.call, !dbg !223 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !211 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !214 +// CHECK:STDOUT: ret ptr %D.call, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !225 { +// CHECK:STDOUT: define linkonce_odr ptr @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !217 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !232 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !235 -// CHECK:STDOUT: ret ptr %D.call, !dbg !236 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !224 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !227 +// CHECK:STDOUT: ret ptr %D.call, !dbg !228 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !264 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !256 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !272 -// CHECK:STDOUT: %A.call = call i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !273 -// CHECK:STDOUT: ret i32 %A.call, !dbg !274 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !264 +// CHECK:STDOUT: %A.call = call i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !265 +// CHECK:STDOUT: ret i32 %A.call, !dbg !266 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !276 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !268 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !284 -// CHECK:STDOUT: %A.call = call double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !285 -// CHECK:STDOUT: ret double %A.call, !dbg !286 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !276 +// CHECK:STDOUT: %A.call = call double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !277 +// CHECK:STDOUT: ret double %A.call, !dbg !278 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !288 { +// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !280 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !296 -// CHECK:STDOUT: %A.call = call ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !297 -// CHECK:STDOUT: ret ptr %A.call, !dbg !298 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !288 +// CHECK:STDOUT: %A.call = call ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !289 +// CHECK:STDOUT: ret ptr %A.call, !dbg !290 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -345,126 +331,118 @@ fn M() { // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !9) // CHECK:STDOUT: !50 = !DILocation(line: 50, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 50, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 50, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !9) // CHECK:STDOUT: !54 = !DILocation(line: 50, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 50, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !9) -// CHECK:STDOUT: !58 = !DILocation(line: 50, column: 3, scope: !56) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) +// CHECK:STDOUT: !58 = !DILocation(line: 49, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !6) // CHECK:STDOUT: !62 = !DILocation(line: 49, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 22, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) -// CHECK:STDOUT: !66 = !DILocation(line: 49, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !6) -// CHECK:STDOUT: !70 = !DILocation(line: 49, column: 3, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 22, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !93) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !6) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 2, scope: !72, type: !6) -// CHECK:STDOUT: !79 = !DILocation(line: 23, column: 7, scope: !72) -// CHECK:STDOUT: !80 = !DILocation(line: 23, column: 6, scope: !72) -// CHECK:STDOUT: !82 = !DILocation(line: 24, column: 5, scope: !72) -// CHECK:STDOUT: !83 = !DILocation(line: 26, column: 7, scope: !72) -// CHECK:STDOUT: !84 = !DILocation(line: 26, column: 6, scope: !72) -// CHECK:STDOUT: !87 = !DILocation(line: 27, column: 12, scope: !72) -// CHECK:STDOUT: !88 = !DILocation(line: 27, column: 5, scope: !72) -// CHECK:STDOUT: !91 = !DILocation(line: 29, column: 12, scope: !72) -// CHECK:STDOUT: !92 = !DILocation(line: 29, column: 5, scope: !72) -// CHECK:STDOUT: !93 = !{!73, !74} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !115) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !9) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 2, scope: !94, type: !6) -// CHECK:STDOUT: !101 = !DILocation(line: 23, column: 7, scope: !94) -// CHECK:STDOUT: !102 = !DILocation(line: 23, column: 6, scope: !94) -// CHECK:STDOUT: !104 = !DILocation(line: 24, column: 5, scope: !94) -// CHECK:STDOUT: !105 = !DILocation(line: 26, column: 7, scope: !94) -// CHECK:STDOUT: !106 = !DILocation(line: 26, column: 6, scope: !94) -// CHECK:STDOUT: !109 = !DILocation(line: 27, column: 12, scope: !94) -// CHECK:STDOUT: !110 = !DILocation(line: 27, column: 5, scope: !94) -// CHECK:STDOUT: !113 = !DILocation(line: 29, column: 12, scope: !94) -// CHECK:STDOUT: !114 = !DILocation(line: 29, column: 5, scope: !94) -// CHECK:STDOUT: !115 = !{!95, !96} -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.a76b78461416b4a8", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !137) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !9) -// CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !116, type: !6) -// CHECK:STDOUT: !123 = !DILocation(line: 23, column: 7, scope: !116) -// CHECK:STDOUT: !124 = !DILocation(line: 23, column: 6, scope: !116) -// CHECK:STDOUT: !126 = !DILocation(line: 24, column: 5, scope: !116) -// CHECK:STDOUT: !127 = !DILocation(line: 26, column: 7, scope: !116) -// CHECK:STDOUT: !128 = !DILocation(line: 26, column: 6, scope: !116) -// CHECK:STDOUT: !131 = !DILocation(line: 27, column: 12, scope: !116) -// CHECK:STDOUT: !132 = !DILocation(line: 27, column: 5, scope: !116) -// CHECK:STDOUT: !135 = !DILocation(line: 29, column: 12, scope: !116) -// CHECK:STDOUT: !136 = !DILocation(line: 29, column: 5, scope: !116) -// CHECK:STDOUT: !137 = !{!117, !118} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 34, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !172) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !6) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 2, scope: !160, type: !6) -// CHECK:STDOUT: !167 = !DILocation(line: 35, column: 3, scope: !160) -// CHECK:STDOUT: !170 = !DILocation(line: 36, column: 10, scope: !160) -// CHECK:STDOUT: !171 = !DILocation(line: 36, column: 3, scope: !160) -// CHECK:STDOUT: !172 = !{!161, !162} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !185) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !6) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 2, scope: !173, type: !6) -// CHECK:STDOUT: !180 = !DILocation(line: 40, column: 3, scope: !173) -// CHECK:STDOUT: !183 = !DILocation(line: 41, column: 10, scope: !173) -// CHECK:STDOUT: !184 = !DILocation(line: 41, column: 3, scope: !173) -// CHECK:STDOUT: !185 = !{!174, !175} -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !198) -// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !9) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 2, scope: !186, type: !6) -// CHECK:STDOUT: !193 = !DILocation(line: 35, column: 3, scope: !186) -// CHECK:STDOUT: !196 = !DILocation(line: 36, column: 10, scope: !186) -// CHECK:STDOUT: !197 = !DILocation(line: 36, column: 3, scope: !186) -// CHECK:STDOUT: !198 = !{!187, !188} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !211) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !9) -// CHECK:STDOUT: !201 = !DILocalVariable(arg: 2, scope: !199, type: !6) -// CHECK:STDOUT: !206 = !DILocation(line: 40, column: 3, scope: !199) -// CHECK:STDOUT: !209 = !DILocation(line: 41, column: 10, scope: !199) -// CHECK:STDOUT: !210 = !DILocation(line: 41, column: 3, scope: !199) -// CHECK:STDOUT: !211 = !{!200, !201} -// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.a76b78461416b4a8", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !224) -// CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !212, type: !9) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 2, scope: !212, type: !6) -// CHECK:STDOUT: !219 = !DILocation(line: 35, column: 3, scope: !212) -// CHECK:STDOUT: !222 = !DILocation(line: 36, column: 10, scope: !212) -// CHECK:STDOUT: !223 = !DILocation(line: 36, column: 3, scope: !212) -// CHECK:STDOUT: !224 = !{!213, !214} -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.a76b78461416b4a8", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !237) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !9) -// CHECK:STDOUT: !227 = !DILocalVariable(arg: 2, scope: !225, type: !6) -// CHECK:STDOUT: !232 = !DILocation(line: 40, column: 3, scope: !225) -// CHECK:STDOUT: !235 = !DILocation(line: 41, column: 10, scope: !225) -// CHECK:STDOUT: !236 = !DILocation(line: 41, column: 3, scope: !225) -// CHECK:STDOUT: !237 = !{!226, !227} -// CHECK:STDOUT: !264 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 44, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !275) -// CHECK:STDOUT: !265 = !DILocalVariable(arg: 1, scope: !264, type: !6) -// CHECK:STDOUT: !266 = !DILocalVariable(arg: 2, scope: !264, type: !6) -// CHECK:STDOUT: !272 = !DILocation(line: 45, column: 15, scope: !264) -// CHECK:STDOUT: !273 = !DILocation(line: 45, column: 10, scope: !264) -// CHECK:STDOUT: !274 = !DILocation(line: 45, column: 3, scope: !264) -// CHECK:STDOUT: !275 = !{!265, !266} -// CHECK:STDOUT: !276 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !287) -// CHECK:STDOUT: !277 = !DILocalVariable(arg: 1, scope: !276, type: !9) -// CHECK:STDOUT: !278 = !DILocalVariable(arg: 2, scope: !276, type: !6) -// CHECK:STDOUT: !284 = !DILocation(line: 45, column: 15, scope: !276) -// CHECK:STDOUT: !285 = !DILocation(line: 45, column: 10, scope: !276) -// CHECK:STDOUT: !286 = !DILocation(line: 45, column: 3, scope: !276) -// CHECK:STDOUT: !287 = !{!277, !278} -// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.a76b78461416b4a8", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !299) -// CHECK:STDOUT: !289 = !DILocalVariable(arg: 1, scope: !288, type: !9) -// CHECK:STDOUT: !290 = !DILocalVariable(arg: 2, scope: !288, type: !6) -// CHECK:STDOUT: !296 = !DILocation(line: 45, column: 15, scope: !288) -// CHECK:STDOUT: !297 = !DILocation(line: 45, column: 10, scope: !288) -// CHECK:STDOUT: !298 = !DILocation(line: 45, column: 3, scope: !288) -// CHECK:STDOUT: !299 = !{!289, !290} +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 2, scope: !64, type: !6) +// CHECK:STDOUT: !71 = !DILocation(line: 23, column: 7, scope: !64) +// CHECK:STDOUT: !72 = !DILocation(line: 23, column: 6, scope: !64) +// CHECK:STDOUT: !74 = !DILocation(line: 24, column: 5, scope: !64) +// CHECK:STDOUT: !75 = !DILocation(line: 26, column: 7, scope: !64) +// CHECK:STDOUT: !76 = !DILocation(line: 26, column: 6, scope: !64) +// CHECK:STDOUT: !79 = !DILocation(line: 27, column: 12, scope: !64) +// CHECK:STDOUT: !80 = !DILocation(line: 27, column: 5, scope: !64) +// CHECK:STDOUT: !83 = !DILocation(line: 29, column: 12, scope: !64) +// CHECK:STDOUT: !84 = !DILocation(line: 29, column: 5, scope: !64) +// CHECK:STDOUT: !85 = !{!65, !66} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !107) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !9) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 2, scope: !86, type: !6) +// CHECK:STDOUT: !93 = !DILocation(line: 23, column: 7, scope: !86) +// CHECK:STDOUT: !94 = !DILocation(line: 23, column: 6, scope: !86) +// CHECK:STDOUT: !96 = !DILocation(line: 24, column: 5, scope: !86) +// CHECK:STDOUT: !97 = !DILocation(line: 26, column: 7, scope: !86) +// CHECK:STDOUT: !98 = !DILocation(line: 26, column: 6, scope: !86) +// CHECK:STDOUT: !101 = !DILocation(line: 27, column: 12, scope: !86) +// CHECK:STDOUT: !102 = !DILocation(line: 27, column: 5, scope: !86) +// CHECK:STDOUT: !105 = !DILocation(line: 29, column: 12, scope: !86) +// CHECK:STDOUT: !106 = !DILocation(line: 29, column: 5, scope: !86) +// CHECK:STDOUT: !107 = !{!87, !88} +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.a76b78461416b4a8", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !9) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 2, scope: !108, type: !6) +// CHECK:STDOUT: !115 = !DILocation(line: 23, column: 7, scope: !108) +// CHECK:STDOUT: !116 = !DILocation(line: 23, column: 6, scope: !108) +// CHECK:STDOUT: !118 = !DILocation(line: 24, column: 5, scope: !108) +// CHECK:STDOUT: !119 = !DILocation(line: 26, column: 7, scope: !108) +// CHECK:STDOUT: !120 = !DILocation(line: 26, column: 6, scope: !108) +// CHECK:STDOUT: !123 = !DILocation(line: 27, column: 12, scope: !108) +// CHECK:STDOUT: !124 = !DILocation(line: 27, column: 5, scope: !108) +// CHECK:STDOUT: !127 = !DILocation(line: 29, column: 12, scope: !108) +// CHECK:STDOUT: !128 = !DILocation(line: 29, column: 5, scope: !108) +// CHECK:STDOUT: !129 = !{!109, !110} +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 34, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !6) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 2, scope: !152, type: !6) +// CHECK:STDOUT: !159 = !DILocation(line: 35, column: 3, scope: !152) +// CHECK:STDOUT: !162 = !DILocation(line: 36, column: 10, scope: !152) +// CHECK:STDOUT: !163 = !DILocation(line: 36, column: 3, scope: !152) +// CHECK:STDOUT: !164 = !{!153, !154} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !6) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 2, scope: !165, type: !6) +// CHECK:STDOUT: !172 = !DILocation(line: 40, column: 3, scope: !165) +// CHECK:STDOUT: !175 = !DILocation(line: 41, column: 10, scope: !165) +// CHECK:STDOUT: !176 = !DILocation(line: 41, column: 3, scope: !165) +// CHECK:STDOUT: !177 = !{!166, !167} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !9) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !6) +// CHECK:STDOUT: !185 = !DILocation(line: 35, column: 3, scope: !178) +// CHECK:STDOUT: !188 = !DILocation(line: 36, column: 10, scope: !178) +// CHECK:STDOUT: !189 = !DILocation(line: 36, column: 3, scope: !178) +// CHECK:STDOUT: !190 = !{!179, !180} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !203) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !9) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 2, scope: !191, type: !6) +// CHECK:STDOUT: !198 = !DILocation(line: 40, column: 3, scope: !191) +// CHECK:STDOUT: !201 = !DILocation(line: 41, column: 10, scope: !191) +// CHECK:STDOUT: !202 = !DILocation(line: 41, column: 3, scope: !191) +// CHECK:STDOUT: !203 = !{!192, !193} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.a76b78461416b4a8", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !216) +// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !9) +// CHECK:STDOUT: !206 = !DILocalVariable(arg: 2, scope: !204, type: !6) +// CHECK:STDOUT: !211 = !DILocation(line: 35, column: 3, scope: !204) +// CHECK:STDOUT: !214 = !DILocation(line: 36, column: 10, scope: !204) +// CHECK:STDOUT: !215 = !DILocation(line: 36, column: 3, scope: !204) +// CHECK:STDOUT: !216 = !{!205, !206} +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.a76b78461416b4a8", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !229) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !9) +// CHECK:STDOUT: !219 = !DILocalVariable(arg: 2, scope: !217, type: !6) +// CHECK:STDOUT: !224 = !DILocation(line: 40, column: 3, scope: !217) +// CHECK:STDOUT: !227 = !DILocation(line: 41, column: 10, scope: !217) +// CHECK:STDOUT: !228 = !DILocation(line: 41, column: 3, scope: !217) +// CHECK:STDOUT: !229 = !{!218, !219} +// CHECK:STDOUT: !256 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 44, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !267) +// CHECK:STDOUT: !257 = !DILocalVariable(arg: 1, scope: !256, type: !6) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 2, scope: !256, type: !6) +// CHECK:STDOUT: !264 = !DILocation(line: 45, column: 15, scope: !256) +// CHECK:STDOUT: !265 = !DILocation(line: 45, column: 10, scope: !256) +// CHECK:STDOUT: !266 = !DILocation(line: 45, column: 3, scope: !256) +// CHECK:STDOUT: !267 = !{!257, !258} +// CHECK:STDOUT: !268 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !279) +// CHECK:STDOUT: !269 = !DILocalVariable(arg: 1, scope: !268, type: !9) +// CHECK:STDOUT: !270 = !DILocalVariable(arg: 2, scope: !268, type: !6) +// CHECK:STDOUT: !276 = !DILocation(line: 45, column: 15, scope: !268) +// CHECK:STDOUT: !277 = !DILocation(line: 45, column: 10, scope: !268) +// CHECK:STDOUT: !278 = !DILocation(line: 45, column: 3, scope: !268) +// CHECK:STDOUT: !279 = !{!269, !270} +// CHECK:STDOUT: !280 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.a76b78461416b4a8", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !291) +// CHECK:STDOUT: !281 = !DILocalVariable(arg: 1, scope: !280, type: !9) +// CHECK:STDOUT: !282 = !DILocalVariable(arg: 2, scope: !280, type: !6) +// CHECK:STDOUT: !288 = !DILocation(line: 45, column: 15, scope: !280) +// CHECK:STDOUT: !289 = !DILocation(line: 45, column: 10, scope: !280) +// CHECK:STDOUT: !290 = !DILocation(line: 45, column: 3, scope: !280) +// CHECK:STDOUT: !291 = !{!281, !282} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon index 495290ad841f..95562cba7ee9 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon @@ -94,128 +94,114 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !72 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !79 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !80 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !71 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !72 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !82 +// CHECK:STDOUT: ret i32 %x, !dbg !74 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !84 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !85 -// CHECK:STDOUT: ret i32 %G.call, !dbg !86 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !76 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !77 +// CHECK:STDOUT: ret i32 %G.call, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !88 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !80 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !95 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !96 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !87 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !88 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !98 +// CHECK:STDOUT: ret double %x, !dbg !90 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !100 -// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !101 -// CHECK:STDOUT: ret double %G.call, !dbg !102 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !92 +// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !93 +// CHECK:STDOUT: ret double %G.call, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !104 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !111 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !112 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !103 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !104 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !114 +// CHECK:STDOUT: ret ptr %x, !dbg !106 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !116 -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !117 -// CHECK:STDOUT: ret ptr %G.call, !dbg !118 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !108 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !109 +// CHECK:STDOUT: ret ptr %G.call, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !136 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !143 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !144 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !135 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !136 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !146 +// CHECK:STDOUT: ret i32 %x, !dbg !138 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !148 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !149 -// CHECK:STDOUT: ret i32 %F.call, !dbg !150 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !140 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !141 +// CHECK:STDOUT: ret i32 %F.call, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !152 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !159 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !160 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !151 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !152 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !162 +// CHECK:STDOUT: ret double %x, !dbg !154 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !164 -// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !165 -// CHECK:STDOUT: ret double %F.call, !dbg !166 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !156 +// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !157 +// CHECK:STDOUT: ret double %F.call, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !168 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !175 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !176 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !167 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !168 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !178 +// CHECK:STDOUT: ret ptr %x, !dbg !170 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !180 -// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !181 -// CHECK:STDOUT: ret ptr %F.call, !dbg !182 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !172 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !173 +// CHECK:STDOUT: ret ptr %F.call, !dbg !174 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -270,84 +256,76 @@ fn M() { // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !9) // CHECK:STDOUT: !50 = !DILocation(line: 34, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 34, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 34, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !9) // CHECK:STDOUT: !54 = !DILocation(line: 34, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 34, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !9) -// CHECK:STDOUT: !58 = !DILocation(line: 34, column: 3, scope: !56) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) +// CHECK:STDOUT: !58 = !DILocation(line: 33, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !6) // CHECK:STDOUT: !62 = !DILocation(line: 33, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 18, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) -// CHECK:STDOUT: !66 = !DILocation(line: 33, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !6) -// CHECK:STDOUT: !70 = !DILocation(line: 33, column: 3, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 18, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !6) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 2, scope: !72, type: !6) -// CHECK:STDOUT: !79 = !DILocation(line: 19, column: 7, scope: !72) -// CHECK:STDOUT: !80 = !DILocation(line: 19, column: 6, scope: !72) -// CHECK:STDOUT: !82 = !DILocation(line: 20, column: 5, scope: !72) -// CHECK:STDOUT: !84 = !DILocation(line: 22, column: 15, scope: !72) -// CHECK:STDOUT: !85 = !DILocation(line: 22, column: 10, scope: !72) -// CHECK:STDOUT: !86 = !DILocation(line: 22, column: 3, scope: !72) -// CHECK:STDOUT: !87 = !{!73, !74} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 18, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !103) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !9) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 2, scope: !88, type: !6) -// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 7, scope: !88) -// CHECK:STDOUT: !96 = !DILocation(line: 19, column: 6, scope: !88) -// CHECK:STDOUT: !98 = !DILocation(line: 20, column: 5, scope: !88) -// CHECK:STDOUT: !100 = !DILocation(line: 22, column: 15, scope: !88) -// CHECK:STDOUT: !101 = !DILocation(line: 22, column: 10, scope: !88) -// CHECK:STDOUT: !102 = !DILocation(line: 22, column: 3, scope: !88) -// CHECK:STDOUT: !103 = !{!89, !90} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 18, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !119) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !9) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 2, scope: !104, type: !6) -// CHECK:STDOUT: !111 = !DILocation(line: 19, column: 7, scope: !104) -// CHECK:STDOUT: !112 = !DILocation(line: 19, column: 6, scope: !104) -// CHECK:STDOUT: !114 = !DILocation(line: 20, column: 5, scope: !104) -// CHECK:STDOUT: !116 = !DILocation(line: 22, column: 15, scope: !104) -// CHECK:STDOUT: !117 = !DILocation(line: 22, column: 10, scope: !104) -// CHECK:STDOUT: !118 = !DILocation(line: 22, column: 3, scope: !104) -// CHECK:STDOUT: !119 = !{!105, !106} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 25, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !6) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 2, scope: !136, type: !6) -// CHECK:STDOUT: !143 = !DILocation(line: 26, column: 7, scope: !136) -// CHECK:STDOUT: !144 = !DILocation(line: 26, column: 6, scope: !136) -// CHECK:STDOUT: !146 = !DILocation(line: 27, column: 5, scope: !136) -// CHECK:STDOUT: !148 = !DILocation(line: 29, column: 15, scope: !136) -// CHECK:STDOUT: !149 = !DILocation(line: 29, column: 10, scope: !136) -// CHECK:STDOUT: !150 = !DILocation(line: 29, column: 3, scope: !136) -// CHECK:STDOUT: !151 = !{!137, !138} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !167) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !9) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 2, scope: !152, type: !6) -// CHECK:STDOUT: !159 = !DILocation(line: 26, column: 7, scope: !152) -// CHECK:STDOUT: !160 = !DILocation(line: 26, column: 6, scope: !152) -// CHECK:STDOUT: !162 = !DILocation(line: 27, column: 5, scope: !152) -// CHECK:STDOUT: !164 = !DILocation(line: 29, column: 15, scope: !152) -// CHECK:STDOUT: !165 = !DILocation(line: 29, column: 10, scope: !152) -// CHECK:STDOUT: !166 = !DILocation(line: 29, column: 3, scope: !152) -// CHECK:STDOUT: !167 = !{!153, !154} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !4, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !9) -// CHECK:STDOUT: !170 = !DILocalVariable(arg: 2, scope: !168, type: !6) -// CHECK:STDOUT: !175 = !DILocation(line: 26, column: 7, scope: !168) -// CHECK:STDOUT: !176 = !DILocation(line: 26, column: 6, scope: !168) -// CHECK:STDOUT: !178 = !DILocation(line: 27, column: 5, scope: !168) -// CHECK:STDOUT: !180 = !DILocation(line: 29, column: 15, scope: !168) -// CHECK:STDOUT: !181 = !DILocation(line: 29, column: 10, scope: !168) -// CHECK:STDOUT: !182 = !DILocation(line: 29, column: 3, scope: !168) -// CHECK:STDOUT: !183 = !{!169, !170} +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 2, scope: !64, type: !6) +// CHECK:STDOUT: !71 = !DILocation(line: 19, column: 7, scope: !64) +// CHECK:STDOUT: !72 = !DILocation(line: 19, column: 6, scope: !64) +// CHECK:STDOUT: !74 = !DILocation(line: 20, column: 5, scope: !64) +// CHECK:STDOUT: !76 = !DILocation(line: 22, column: 15, scope: !64) +// CHECK:STDOUT: !77 = !DILocation(line: 22, column: 10, scope: !64) +// CHECK:STDOUT: !78 = !DILocation(line: 22, column: 3, scope: !64) +// CHECK:STDOUT: !79 = !{!65, !66} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 18, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !95) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !9) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 2, scope: !80, type: !6) +// CHECK:STDOUT: !87 = !DILocation(line: 19, column: 7, scope: !80) +// CHECK:STDOUT: !88 = !DILocation(line: 19, column: 6, scope: !80) +// CHECK:STDOUT: !90 = !DILocation(line: 20, column: 5, scope: !80) +// CHECK:STDOUT: !92 = !DILocation(line: 22, column: 15, scope: !80) +// CHECK:STDOUT: !93 = !DILocation(line: 22, column: 10, scope: !80) +// CHECK:STDOUT: !94 = !DILocation(line: 22, column: 3, scope: !80) +// CHECK:STDOUT: !95 = !{!81, !82} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 18, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !9) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 2, scope: !96, type: !6) +// CHECK:STDOUT: !103 = !DILocation(line: 19, column: 7, scope: !96) +// CHECK:STDOUT: !104 = !DILocation(line: 19, column: 6, scope: !96) +// CHECK:STDOUT: !106 = !DILocation(line: 20, column: 5, scope: !96) +// CHECK:STDOUT: !108 = !DILocation(line: 22, column: 15, scope: !96) +// CHECK:STDOUT: !109 = !DILocation(line: 22, column: 10, scope: !96) +// CHECK:STDOUT: !110 = !DILocation(line: 22, column: 3, scope: !96) +// CHECK:STDOUT: !111 = !{!97, !98} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 25, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !6) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 2, scope: !128, type: !6) +// CHECK:STDOUT: !135 = !DILocation(line: 26, column: 7, scope: !128) +// CHECK:STDOUT: !136 = !DILocation(line: 26, column: 6, scope: !128) +// CHECK:STDOUT: !138 = !DILocation(line: 27, column: 5, scope: !128) +// CHECK:STDOUT: !140 = !DILocation(line: 29, column: 15, scope: !128) +// CHECK:STDOUT: !141 = !DILocation(line: 29, column: 10, scope: !128) +// CHECK:STDOUT: !142 = !DILocation(line: 29, column: 3, scope: !128) +// CHECK:STDOUT: !143 = !{!129, !130} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !9) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !144, type: !6) +// CHECK:STDOUT: !151 = !DILocation(line: 26, column: 7, scope: !144) +// CHECK:STDOUT: !152 = !DILocation(line: 26, column: 6, scope: !144) +// CHECK:STDOUT: !154 = !DILocation(line: 27, column: 5, scope: !144) +// CHECK:STDOUT: !156 = !DILocation(line: 29, column: 15, scope: !144) +// CHECK:STDOUT: !157 = !DILocation(line: 29, column: 10, scope: !144) +// CHECK:STDOUT: !158 = !DILocation(line: 29, column: 3, scope: !144) +// CHECK:STDOUT: !159 = !{!145, !146} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !4, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !175) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !9) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 2, scope: !160, type: !6) +// CHECK:STDOUT: !167 = !DILocation(line: 26, column: 7, scope: !160) +// CHECK:STDOUT: !168 = !DILocation(line: 26, column: 6, scope: !160) +// CHECK:STDOUT: !170 = !DILocation(line: 27, column: 5, scope: !160) +// CHECK:STDOUT: !172 = !DILocation(line: 29, column: 15, scope: !160) +// CHECK:STDOUT: !173 = !DILocation(line: 29, column: 10, scope: !160) +// CHECK:STDOUT: !174 = !DILocation(line: 29, column: 3, scope: !160) +// CHECK:STDOUT: !175 = !{!161, !162} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon index 1706c079e151..f90f8b7f96f0 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon @@ -102,53 +102,39 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !74 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !76 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !78 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !80 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.369f53a8d4c38871(ptr %x, ptr %y, i32 %count) #0 !dbg !82 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.369f53a8d4c38871(ptr %x, ptr %y, i32 %count) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !91 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !92 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !83 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !84 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !94 +// CHECK:STDOUT: ret i32 %count, !dbg !86 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !97 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.369f53a8d4c38871(ptr %y, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !98 -// CHECK:STDOUT: ret i32 %F.call, !dbg !99 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !89 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.369f53a8d4c38871(ptr %y, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !90 +// CHECK:STDOUT: ret i32 %F.call, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -209,35 +195,27 @@ fn M() { // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !9) // CHECK:STDOUT: !60 = !DILocation(line: 24, column: 3, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 24, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 24, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !9) // CHECK:STDOUT: !64 = !DILocation(line: 24, column: 3, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 24, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !9) -// CHECK:STDOUT: !68 = !DILocation(line: 24, column: 3, scope: !66) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !6) +// CHECK:STDOUT: !68 = !DILocation(line: 23, column: 3, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !6) // CHECK:STDOUT: !72 = !DILocation(line: 23, column: 3, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !6) -// CHECK:STDOUT: !76 = !DILocation(line: 23, column: 3, scope: !74) -// CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !6) -// CHECK:STDOUT: !80 = !DILocation(line: 23, column: 3, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.369f53a8d4c38871", scope: null, file: !4, line: 15, type: !37, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !9) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 2, scope: !82, type: !9) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 3, scope: !82, type: !6) -// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 7, scope: !82) -// CHECK:STDOUT: !92 = !DILocation(line: 16, column: 6, scope: !82) -// CHECK:STDOUT: !94 = !DILocation(line: 17, column: 5, scope: !82) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 18, scope: !82) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 10, scope: !82) -// CHECK:STDOUT: !99 = !DILocation(line: 19, column: 3, scope: !82) -// CHECK:STDOUT: !100 = !{!83, !84, !85} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.369f53a8d4c38871", scope: null, file: !4, line: 15, type: !37, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !9) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !74, type: !9) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 3, scope: !74, type: !6) +// CHECK:STDOUT: !83 = !DILocation(line: 16, column: 7, scope: !74) +// CHECK:STDOUT: !84 = !DILocation(line: 16, column: 6, scope: !74) +// CHECK:STDOUT: !86 = !DILocation(line: 17, column: 5, scope: !74) +// CHECK:STDOUT: !89 = !DILocation(line: 19, column: 18, scope: !74) +// CHECK:STDOUT: !90 = !DILocation(line: 19, column: 10, scope: !74) +// CHECK:STDOUT: !91 = !DILocation(line: 19, column: 3, scope: !74) +// CHECK:STDOUT: !92 = !{!75, !76, !77} // CHECK:STDOUT: 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 b1423779ba74..4818b7a19685 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon @@ -185,181 +185,153 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !128 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !128 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !130 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !132 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !132 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !134 // CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !136 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !136 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !140 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !140 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !144 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self), !dbg !146 // CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea6dff92ea7b44ef:core.Destroy.Core"(ptr %self) #0 !dbg !148 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !152 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !156 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !158 -// CHECK:STDOUT: ret void, !dbg !158 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea6dff92ea7b44ef:core.Destroy.Core"(ptr %self) #0 !dbg !160 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !162 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !164 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !166 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !168 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !170 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.bb004feba9dd474d(i16 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !172 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.bb004feba9dd474d(i16 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !156 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !183 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !184 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !167 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !168 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !186 +// CHECK:STDOUT: ret i32 %count, !dbg !170 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !190 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.bb004feba9dd474d(i16 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !191 -// CHECK:STDOUT: ret i32 %F.call, !dbg !192 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !174 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.bb004feba9dd474d(i16 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !175 +// CHECK:STDOUT: ret i32 %F.call, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.f24eb6b05368f488(i32 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !194 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.f24eb6b05368f488(i32 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !178 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !205 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !206 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !189 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !190 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !208 +// CHECK:STDOUT: ret i32 %count, !dbg !192 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !212 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.f24eb6b05368f488(i32 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !213 -// CHECK:STDOUT: ret i32 %F.call, !dbg !214 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !196 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.f24eb6b05368f488(i32 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !197 +// CHECK:STDOUT: ret i32 %F.call, !dbg !198 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.427cba2b3278d1dc(i1 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !216 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.427cba2b3278d1dc(i1 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !200 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !227 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !228 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !211 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !212 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !230 +// CHECK:STDOUT: ret i32 %count, !dbg !214 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !234 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.427cba2b3278d1dc(i1 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !235 -// CHECK:STDOUT: ret i32 %F.call, !dbg !236 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !218 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.427cba2b3278d1dc(i1 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !219 +// CHECK:STDOUT: ret i32 %F.call, !dbg !220 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.ea32bb7f769e7967(i64 %x, i1 %y, ptr %z, i32 %count) #0 !dbg !238 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.ea32bb7f769e7967(i64 %x, i1 %y, ptr %z, i32 %count) #0 !dbg !222 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !249 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !250 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !233 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !234 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !252 +// CHECK:STDOUT: ret i32 %count, !dbg !236 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !256 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.b1f6aa8c7fcac0ca(i64 %x, ptr %z, i1 %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !257 -// CHECK:STDOUT: ret i32 %F.call, !dbg !258 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !240 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.b1f6aa8c7fcac0ca(i64 %x, ptr %z, i1 %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !241 +// CHECK:STDOUT: ret i32 %F.call, !dbg !242 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.6eab5c6411742e70(double %x, ptr %y, ptr %z, i32 %count) #0 !dbg !260 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.6eab5c6411742e70(double %x, ptr %y, ptr %z, i32 %count) #0 !dbg !244 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !271 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !272 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !255 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !256 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !274 +// CHECK:STDOUT: ret i32 %count, !dbg !258 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !278 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.6eab5c6411742e70(double %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !279 -// CHECK:STDOUT: ret i32 %F.call, !dbg !280 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !262 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.6eab5c6411742e70(double %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !263 +// CHECK:STDOUT: ret i32 %F.call, !dbg !264 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.732da705e71cd359(ptr %x, ptr %y, ptr %z, i32 %count) #0 !dbg !282 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.732da705e71cd359(ptr %x, ptr %y, ptr %z, i32 %count) #0 !dbg !266 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !293 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !294 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !277 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !278 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !296 +// CHECK:STDOUT: ret i32 %count, !dbg !280 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !300 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.732da705e71cd359(ptr %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !301 -// CHECK:STDOUT: ret i32 %F.call, !dbg !302 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !284 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.732da705e71cd359(ptr %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !285 +// CHECK:STDOUT: ret i32 %F.call, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.b1f6aa8c7fcac0ca(i64 %x, ptr %y, i1 %z, i32 %count) #0 !dbg !502 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.b1f6aa8c7fcac0ca(i64 %x, ptr %y, i1 %z, i32 %count) #0 !dbg !486 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !513 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !514 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !497 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !498 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !516 +// CHECK:STDOUT: ret i32 %count, !dbg !500 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !520 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.ea32bb7f769e7967(i64 %x, i1 %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !521 -// CHECK:STDOUT: ret i32 %F.call, !dbg !522 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !504 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.ea32bb7f769e7967(i64 %x, i1 %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !505 +// CHECK:STDOUT: ret i32 %F.call, !dbg !506 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -481,132 +453,116 @@ fn M() { // CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !11) // CHECK:STDOUT: !126 = !DILocation(line: 26, column: 3, scope: !124) // CHECK:STDOUT: !127 = !{!125} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) // CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !11) // CHECK:STDOUT: !130 = !DILocation(line: 26, column: 3, scope: !128) // CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !11) -// CHECK:STDOUT: !134 = !DILocation(line: 26, column: 3, scope: !132) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !8) +// CHECK:STDOUT: !134 = !DILocation(line: 25, column: 3, scope: !132) // CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) // CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !8) // CHECK:STDOUT: !138 = !DILocation(line: 25, column: 3, scope: !136) // CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !8) -// CHECK:STDOUT: !142 = !DILocation(line: 25, column: 3, scope: !140) +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !6) +// CHECK:STDOUT: !142 = !DILocation(line: 24, column: 3, scope: !140) // CHECK:STDOUT: !143 = !{!141} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !8) -// CHECK:STDOUT: !146 = !DILocation(line: 25, column: 3, scope: !144) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !6) +// CHECK:STDOUT: !146 = !DILocation(line: 24, column: 3, scope: !144) // CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !6) -// CHECK:STDOUT: !150 = !DILocation(line: 24, column: 3, scope: !148) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea6dff92ea7b44ef:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !7) +// CHECK:STDOUT: !150 = !DILocation(line: 23, column: 3, scope: !148) // CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !6) -// CHECK:STDOUT: !154 = !DILocation(line: 24, column: 3, scope: !152) +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !7) +// CHECK:STDOUT: !154 = !DILocation(line: 23, column: 3, scope: !152) // CHECK:STDOUT: !155 = !{!153} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !6) -// CHECK:STDOUT: !158 = !DILocation(line: 24, column: 3, scope: !156) -// CHECK:STDOUT: !159 = !{!157} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea6dff92ea7b44ef:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !163) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !7) -// CHECK:STDOUT: !162 = !DILocation(line: 23, column: 3, scope: !160) -// CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !167) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !7) -// CHECK:STDOUT: !166 = !DILocation(line: 23, column: 3, scope: !164) -// CHECK:STDOUT: !167 = !{!165} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !171) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !7) -// CHECK:STDOUT: !170 = !DILocation(line: 23, column: 3, scope: !168) -// CHECK:STDOUT: !171 = !{!169} -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bb004feba9dd474d", scope: null, file: !4, line: 15, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !193) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !7) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 2, scope: !172, type: !11) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 3, scope: !172, type: !11) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 4, scope: !172, type: !6) -// CHECK:STDOUT: !183 = !DILocation(line: 16, column: 7, scope: !172) -// CHECK:STDOUT: !184 = !DILocation(line: 16, column: 6, scope: !172) -// CHECK:STDOUT: !186 = !DILocation(line: 17, column: 5, scope: !172) -// CHECK:STDOUT: !190 = !DILocation(line: 19, column: 21, scope: !172) -// CHECK:STDOUT: !191 = !DILocation(line: 19, column: 10, scope: !172) -// CHECK:STDOUT: !192 = !DILocation(line: 19, column: 3, scope: !172) -// CHECK:STDOUT: !193 = !{!173, !174, !175, !176} -// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f24eb6b05368f488", scope: null, file: !4, line: 15, type: !58, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !215) -// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !6) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 2, scope: !194, type: !11) -// CHECK:STDOUT: !197 = !DILocalVariable(arg: 3, scope: !194, type: !11) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 4, scope: !194, type: !6) -// CHECK:STDOUT: !205 = !DILocation(line: 16, column: 7, scope: !194) -// CHECK:STDOUT: !206 = !DILocation(line: 16, column: 6, scope: !194) -// CHECK:STDOUT: !208 = !DILocation(line: 17, column: 5, scope: !194) -// CHECK:STDOUT: !212 = !DILocation(line: 19, column: 21, scope: !194) -// CHECK:STDOUT: !213 = !DILocation(line: 19, column: 10, scope: !194) -// CHECK:STDOUT: !214 = !DILocation(line: 19, column: 3, scope: !194) -// CHECK:STDOUT: !215 = !{!195, !196, !197, !198} -// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.427cba2b3278d1dc", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !237) -// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !11) -// CHECK:STDOUT: !218 = !DILocalVariable(arg: 2, scope: !216, type: !11) -// CHECK:STDOUT: !219 = !DILocalVariable(arg: 3, scope: !216, type: !11) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 4, scope: !216, type: !6) -// CHECK:STDOUT: !227 = !DILocation(line: 16, column: 7, scope: !216) -// CHECK:STDOUT: !228 = !DILocation(line: 16, column: 6, scope: !216) -// CHECK:STDOUT: !230 = !DILocation(line: 17, column: 5, scope: !216) -// CHECK:STDOUT: !234 = !DILocation(line: 19, column: 21, scope: !216) -// CHECK:STDOUT: !235 = !DILocation(line: 19, column: 10, scope: !216) -// CHECK:STDOUT: !236 = !DILocation(line: 19, column: 3, scope: !216) -// CHECK:STDOUT: !237 = !{!217, !218, !219, !220} -// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ea32bb7f769e7967", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !259) -// CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !8) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 2, scope: !238, type: !11) -// CHECK:STDOUT: !241 = !DILocalVariable(arg: 3, scope: !238, type: !11) -// CHECK:STDOUT: !242 = !DILocalVariable(arg: 4, scope: !238, type: !6) -// CHECK:STDOUT: !249 = !DILocation(line: 16, column: 7, scope: !238) -// CHECK:STDOUT: !250 = !DILocation(line: 16, column: 6, scope: !238) -// CHECK:STDOUT: !252 = !DILocation(line: 17, column: 5, scope: !238) -// CHECK:STDOUT: !256 = !DILocation(line: 19, column: 21, scope: !238) -// CHECK:STDOUT: !257 = !DILocation(line: 19, column: 10, scope: !238) -// CHECK:STDOUT: !258 = !DILocation(line: 19, column: 3, scope: !238) -// CHECK:STDOUT: !259 = !{!239, !240, !241, !242} -// CHECK:STDOUT: !260 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6eab5c6411742e70", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !281) -// CHECK:STDOUT: !261 = !DILocalVariable(arg: 1, scope: !260, type: !11) -// CHECK:STDOUT: !262 = !DILocalVariable(arg: 2, scope: !260, type: !11) -// CHECK:STDOUT: !263 = !DILocalVariable(arg: 3, scope: !260, type: !11) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 4, scope: !260, type: !6) -// CHECK:STDOUT: !271 = !DILocation(line: 16, column: 7, scope: !260) -// CHECK:STDOUT: !272 = !DILocation(line: 16, column: 6, scope: !260) -// CHECK:STDOUT: !274 = !DILocation(line: 17, column: 5, scope: !260) -// CHECK:STDOUT: !278 = !DILocation(line: 19, column: 21, scope: !260) -// CHECK:STDOUT: !279 = !DILocation(line: 19, column: 10, scope: !260) -// CHECK:STDOUT: !280 = !DILocation(line: 19, column: 3, scope: !260) -// CHECK:STDOUT: !281 = !{!261, !262, !263, !264} -// CHECK:STDOUT: !282 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.732da705e71cd359", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !303) -// CHECK:STDOUT: !283 = !DILocalVariable(arg: 1, scope: !282, type: !11) -// CHECK:STDOUT: !284 = !DILocalVariable(arg: 2, scope: !282, type: !11) -// CHECK:STDOUT: !285 = !DILocalVariable(arg: 3, scope: !282, type: !11) -// CHECK:STDOUT: !286 = !DILocalVariable(arg: 4, scope: !282, type: !6) -// CHECK:STDOUT: !293 = !DILocation(line: 16, column: 7, scope: !282) -// CHECK:STDOUT: !294 = !DILocation(line: 16, column: 6, scope: !282) -// CHECK:STDOUT: !296 = !DILocation(line: 17, column: 5, scope: !282) -// CHECK:STDOUT: !300 = !DILocation(line: 19, column: 21, scope: !282) -// CHECK:STDOUT: !301 = !DILocation(line: 19, column: 10, scope: !282) -// CHECK:STDOUT: !302 = !DILocation(line: 19, column: 3, scope: !282) -// CHECK:STDOUT: !303 = !{!283, !284, !285, !286} -// CHECK:STDOUT: !502 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b1f6aa8c7fcac0ca", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !523) -// CHECK:STDOUT: !503 = !DILocalVariable(arg: 1, scope: !502, type: !8) -// CHECK:STDOUT: !504 = !DILocalVariable(arg: 2, scope: !502, type: !11) -// CHECK:STDOUT: !505 = !DILocalVariable(arg: 3, scope: !502, type: !11) -// CHECK:STDOUT: !506 = !DILocalVariable(arg: 4, scope: !502, type: !6) -// CHECK:STDOUT: !513 = !DILocation(line: 16, column: 7, scope: !502) -// CHECK:STDOUT: !514 = !DILocation(line: 16, column: 6, scope: !502) -// CHECK:STDOUT: !516 = !DILocation(line: 17, column: 5, scope: !502) -// CHECK:STDOUT: !520 = !DILocation(line: 19, column: 21, scope: !502) -// CHECK:STDOUT: !521 = !DILocation(line: 19, column: 10, scope: !502) -// CHECK:STDOUT: !522 = !DILocation(line: 19, column: 3, scope: !502) -// CHECK:STDOUT: !523 = !{!503, !504, !505, !506} +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bb004feba9dd474d", scope: null, file: !4, line: 15, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !7) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 2, scope: !156, type: !11) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 3, scope: !156, type: !11) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 4, scope: !156, type: !6) +// CHECK:STDOUT: !167 = !DILocation(line: 16, column: 7, scope: !156) +// CHECK:STDOUT: !168 = !DILocation(line: 16, column: 6, scope: !156) +// CHECK:STDOUT: !170 = !DILocation(line: 17, column: 5, scope: !156) +// CHECK:STDOUT: !174 = !DILocation(line: 19, column: 21, scope: !156) +// CHECK:STDOUT: !175 = !DILocation(line: 19, column: 10, scope: !156) +// CHECK:STDOUT: !176 = !DILocation(line: 19, column: 3, scope: !156) +// CHECK:STDOUT: !177 = !{!157, !158, !159, !160} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f24eb6b05368f488", scope: null, file: !4, line: 15, type: !58, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !199) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !6) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !11) +// CHECK:STDOUT: !181 = !DILocalVariable(arg: 3, scope: !178, type: !11) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 4, scope: !178, type: !6) +// CHECK:STDOUT: !189 = !DILocation(line: 16, column: 7, scope: !178) +// CHECK:STDOUT: !190 = !DILocation(line: 16, column: 6, scope: !178) +// CHECK:STDOUT: !192 = !DILocation(line: 17, column: 5, scope: !178) +// CHECK:STDOUT: !196 = !DILocation(line: 19, column: 21, scope: !178) +// CHECK:STDOUT: !197 = !DILocation(line: 19, column: 10, scope: !178) +// CHECK:STDOUT: !198 = !DILocation(line: 19, column: 3, scope: !178) +// CHECK:STDOUT: !199 = !{!179, !180, !181, !182} +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.427cba2b3278d1dc", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) +// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !11) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 2, scope: !200, type: !11) +// CHECK:STDOUT: !203 = !DILocalVariable(arg: 3, scope: !200, type: !11) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 4, scope: !200, type: !6) +// CHECK:STDOUT: !211 = !DILocation(line: 16, column: 7, scope: !200) +// CHECK:STDOUT: !212 = !DILocation(line: 16, column: 6, scope: !200) +// CHECK:STDOUT: !214 = !DILocation(line: 17, column: 5, scope: !200) +// CHECK:STDOUT: !218 = !DILocation(line: 19, column: 21, scope: !200) +// CHECK:STDOUT: !219 = !DILocation(line: 19, column: 10, scope: !200) +// CHECK:STDOUT: !220 = !DILocation(line: 19, column: 3, scope: !200) +// CHECK:STDOUT: !221 = !{!201, !202, !203, !204} +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.ea32bb7f769e7967", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !243) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !8) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 2, scope: !222, type: !11) +// CHECK:STDOUT: !225 = !DILocalVariable(arg: 3, scope: !222, type: !11) +// CHECK:STDOUT: !226 = !DILocalVariable(arg: 4, scope: !222, type: !6) +// CHECK:STDOUT: !233 = !DILocation(line: 16, column: 7, scope: !222) +// CHECK:STDOUT: !234 = !DILocation(line: 16, column: 6, scope: !222) +// CHECK:STDOUT: !236 = !DILocation(line: 17, column: 5, scope: !222) +// CHECK:STDOUT: !240 = !DILocation(line: 19, column: 21, scope: !222) +// CHECK:STDOUT: !241 = !DILocation(line: 19, column: 10, scope: !222) +// CHECK:STDOUT: !242 = !DILocation(line: 19, column: 3, scope: !222) +// CHECK:STDOUT: !243 = !{!223, !224, !225, !226} +// CHECK:STDOUT: !244 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6eab5c6411742e70", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !265) +// CHECK:STDOUT: !245 = !DILocalVariable(arg: 1, scope: !244, type: !11) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 2, scope: !244, type: !11) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 3, scope: !244, type: !11) +// CHECK:STDOUT: !248 = !DILocalVariable(arg: 4, scope: !244, type: !6) +// CHECK:STDOUT: !255 = !DILocation(line: 16, column: 7, scope: !244) +// CHECK:STDOUT: !256 = !DILocation(line: 16, column: 6, scope: !244) +// CHECK:STDOUT: !258 = !DILocation(line: 17, column: 5, scope: !244) +// CHECK:STDOUT: !262 = !DILocation(line: 19, column: 21, scope: !244) +// CHECK:STDOUT: !263 = !DILocation(line: 19, column: 10, scope: !244) +// CHECK:STDOUT: !264 = !DILocation(line: 19, column: 3, scope: !244) +// CHECK:STDOUT: !265 = !{!245, !246, !247, !248} +// CHECK:STDOUT: !266 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.732da705e71cd359", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !287) +// CHECK:STDOUT: !267 = !DILocalVariable(arg: 1, scope: !266, type: !11) +// CHECK:STDOUT: !268 = !DILocalVariable(arg: 2, scope: !266, type: !11) +// CHECK:STDOUT: !269 = !DILocalVariable(arg: 3, scope: !266, type: !11) +// CHECK:STDOUT: !270 = !DILocalVariable(arg: 4, scope: !266, type: !6) +// CHECK:STDOUT: !277 = !DILocation(line: 16, column: 7, scope: !266) +// CHECK:STDOUT: !278 = !DILocation(line: 16, column: 6, scope: !266) +// CHECK:STDOUT: !280 = !DILocation(line: 17, column: 5, scope: !266) +// CHECK:STDOUT: !284 = !DILocation(line: 19, column: 21, scope: !266) +// CHECK:STDOUT: !285 = !DILocation(line: 19, column: 10, scope: !266) +// CHECK:STDOUT: !286 = !DILocation(line: 19, column: 3, scope: !266) +// CHECK:STDOUT: !287 = !{!267, !268, !269, !270} +// CHECK:STDOUT: !486 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b1f6aa8c7fcac0ca", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !507) +// CHECK:STDOUT: !487 = !DILocalVariable(arg: 1, scope: !486, type: !8) +// CHECK:STDOUT: !488 = !DILocalVariable(arg: 2, scope: !486, type: !11) +// CHECK:STDOUT: !489 = !DILocalVariable(arg: 3, scope: !486, type: !11) +// CHECK:STDOUT: !490 = !DILocalVariable(arg: 4, scope: !486, type: !6) +// CHECK:STDOUT: !497 = !DILocation(line: 16, column: 7, scope: !486) +// CHECK:STDOUT: !498 = !DILocation(line: 16, column: 6, scope: !486) +// CHECK:STDOUT: !500 = !DILocation(line: 17, column: 5, scope: !486) +// CHECK:STDOUT: !504 = !DILocation(line: 19, column: 21, scope: !486) +// CHECK:STDOUT: !505 = !DILocation(line: 19, column: 10, scope: !486) +// CHECK:STDOUT: !506 = !DILocation(line: 19, column: 3, scope: !486) +// CHECK:STDOUT: !507 = !{!487, !488, !489, !490} // CHECK:STDOUT: 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 dc2b34f5b1d1..77d6a44cc162 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon @@ -138,268 +138,254 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !72 { +// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !81 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !86 -// CHECK:STDOUT: ret i32 %D.call, !dbg !87 +// CHECK:STDOUT: call void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !73 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !78 +// CHECK:STDOUT: ret i32 %D.call, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !89 { +// CHECK:STDOUT: define linkonce_odr double @_CA.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !98 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !103 -// CHECK:STDOUT: ret double %D.call, !dbg !104 +// CHECK:STDOUT: call void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !90 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !95 +// CHECK:STDOUT: ret double %D.call, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !106 { +// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !98 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !115 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !118 -// CHECK:STDOUT: ret ptr %D.call, !dbg !119 +// CHECK:STDOUT: call void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !107 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !110 +// CHECK:STDOUT: ret ptr %D.call, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !136 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !143 -// CHECK:STDOUT: ret void, !dbg !144 +// CHECK:STDOUT: call void @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !135 +// CHECK:STDOUT: ret void, !dbg !136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !146 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !138 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !153 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !154 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !145 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !146 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !156 +// CHECK:STDOUT: ret i32 %x, !dbg !148 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !157 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !157 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !158 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !149 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !149 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !150 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call i32 @_CE.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !161 -// CHECK:STDOUT: ret i32 %E.call, !dbg !162 +// CHECK:STDOUT: %E.call = call i32 @_CE.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !153 +// CHECK:STDOUT: ret i32 %E.call, !dbg !154 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !165 -// CHECK:STDOUT: ret i32 %F.call, !dbg !166 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !157 +// CHECK:STDOUT: ret i32 %F.call, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !168 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !175 -// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: call void @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !167 +// CHECK:STDOUT: ret void, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !178 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !185 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !186 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !177 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !178 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !188 +// CHECK:STDOUT: ret double %x, !dbg !180 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !189 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !189 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !190 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !181 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !181 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !182 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call double @_CE.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !193 -// CHECK:STDOUT: ret double %E.call, !dbg !194 +// CHECK:STDOUT: %E.call = call double @_CE.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !185 +// CHECK:STDOUT: ret double %E.call, !dbg !186 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !197 -// CHECK:STDOUT: ret double %F.call, !dbg !198 +// CHECK:STDOUT: %F.call = call double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !189 +// CHECK:STDOUT: ret double %F.call, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !200 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !192 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !207 -// CHECK:STDOUT: ret void, !dbg !208 +// CHECK:STDOUT: call void @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !199 +// CHECK:STDOUT: ret void, !dbg !200 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !210 { +// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !202 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !217 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !218 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !209 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !210 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !220 +// CHECK:STDOUT: ret ptr %x, !dbg !212 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !221 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !221 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !222 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !213 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !213 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !214 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call ptr @_CE.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !225 -// CHECK:STDOUT: ret ptr %E.call, !dbg !226 +// CHECK:STDOUT: %E.call = call ptr @_CE.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !217 +// CHECK:STDOUT: ret ptr %E.call, !dbg !218 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !229 -// CHECK:STDOUT: ret ptr %F.call, !dbg !230 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !221 +// CHECK:STDOUT: ret ptr %F.call, !dbg !222 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !264 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !256 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !269 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !270 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !261 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !262 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !272 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !274 -// CHECK:STDOUT: call void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !275 -// CHECK:STDOUT: br label %if.else, !dbg !276 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !264 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !266 +// CHECK:STDOUT: call void @_CB.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !267 +// CHECK:STDOUT: br label %if.else, !dbg !268 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !277 +// CHECK:STDOUT: ret void, !dbg !269 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CE.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !279 { +// CHECK:STDOUT: define linkonce_odr i32 @_CE.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !288 -// CHECK:STDOUT: ret i32 %G.call, !dbg !289 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !280 +// CHECK:STDOUT: ret i32 %G.call, !dbg !281 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !291 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !283 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !300 -// CHECK:STDOUT: ret i32 %G.call, !dbg !301 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count), !dbg !292 +// CHECK:STDOUT: ret i32 %G.call, !dbg !293 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !303 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !295 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !308 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !309 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !300 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !301 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !311 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !313 -// CHECK:STDOUT: call void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !314 -// CHECK:STDOUT: br label %if.else, !dbg !315 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !303 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !305 +// CHECK:STDOUT: call void @_CB.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !306 +// CHECK:STDOUT: br label %if.else, !dbg !307 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !316 +// CHECK:STDOUT: ret void, !dbg !308 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CE.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !318 { +// CHECK:STDOUT: define linkonce_odr double @_CE.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !310 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !327 -// CHECK:STDOUT: ret double %G.call, !dbg !328 +// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !319 +// CHECK:STDOUT: ret double %G.call, !dbg !320 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !330 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !322 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !339 -// CHECK:STDOUT: ret double %G.call, !dbg !340 +// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count), !dbg !331 +// CHECK:STDOUT: ret double %G.call, !dbg !332 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !342 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !334 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !347 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !348 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !339 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !340 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !350 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !352 -// CHECK:STDOUT: call void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !353 -// CHECK:STDOUT: br label %if.else, !dbg !354 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !342 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !344 +// CHECK:STDOUT: call void @_CB.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !345 +// CHECK:STDOUT: br label %if.else, !dbg !346 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !355 +// CHECK:STDOUT: ret void, !dbg !347 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CE.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !357 { +// CHECK:STDOUT: define linkonce_odr ptr @_CE.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !349 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !366 -// CHECK:STDOUT: ret ptr %G.call, !dbg !367 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !358 +// CHECK:STDOUT: ret ptr %G.call, !dbg !359 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !369 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !361 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !378 -// CHECK:STDOUT: ret ptr %G.call, !dbg !379 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count), !dbg !370 +// CHECK:STDOUT: ret ptr %G.call, !dbg !371 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @printf(ptr, ...) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !420 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x, i32 %count) #0 !dbg !412 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !428 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !429 -// CHECK:STDOUT: ret i32 %D.call, !dbg !430 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !420 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.4d6ceefeb7f772f4(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !421 +// CHECK:STDOUT: ret i32 %D.call, !dbg !422 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !432 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x, i32 %count) #0 !dbg !424 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !440 -// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !441 -// CHECK:STDOUT: ret double %D.call, !dbg !442 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !432 +// CHECK:STDOUT: %D.call = call double @_CD.Main.c5e4ba542a56b71f(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !433 +// CHECK:STDOUT: ret double %D.call, !dbg !434 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !444 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x, i32 %count) #0 !dbg !436 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !452 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !453 -// CHECK:STDOUT: ret ptr %D.call, !dbg !454 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !444 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.a76b78461416b4a8(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !445 +// CHECK:STDOUT: ret ptr %D.call, !dbg !446 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -458,196 +444,188 @@ fn M() { // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !9) // CHECK:STDOUT: !50 = !DILocation(line: 76, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 76, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 76, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !9) // CHECK:STDOUT: !54 = !DILocation(line: 76, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 76, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !9) -// CHECK:STDOUT: !58 = !DILocation(line: 76, column: 3, scope: !56) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) +// CHECK:STDOUT: !58 = !DILocation(line: 75, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !6) // CHECK:STDOUT: !62 = !DILocation(line: 75, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) -// CHECK:STDOUT: !66 = !DILocation(line: 75, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !6) -// CHECK:STDOUT: !70 = !DILocation(line: 75, column: 3, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !6) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 2, scope: !72, type: !6) -// CHECK:STDOUT: !81 = !DILocation(line: 33, column: 3, scope: !72) -// CHECK:STDOUT: !82 = !{null, !6, !6} -// CHECK:STDOUT: !83 = !DISubroutineType(types: !82) -// CHECK:STDOUT: !86 = !DILocation(line: 34, column: 10, scope: !72) -// CHECK:STDOUT: !87 = !DILocation(line: 34, column: 3, scope: !72) -// CHECK:STDOUT: !88 = !{!73, !74} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !105) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !9) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 2, scope: !89, type: !6) -// CHECK:STDOUT: !98 = !DILocation(line: 33, column: 3, scope: !89) -// CHECK:STDOUT: !99 = !{null, !9, !6} -// CHECK:STDOUT: !100 = !DISubroutineType(types: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 34, column: 10, scope: !89) -// CHECK:STDOUT: !104 = !DILocation(line: 34, column: 3, scope: !89) -// CHECK:STDOUT: !105 = !{!90, !91} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.a76b78461416b4a8", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !9) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 2, scope: !106, type: !6) -// CHECK:STDOUT: !115 = !DILocation(line: 33, column: 3, scope: !106) -// CHECK:STDOUT: !118 = !DILocation(line: 34, column: 10, scope: !106) -// CHECK:STDOUT: !119 = !DILocation(line: 34, column: 3, scope: !106) -// CHECK:STDOUT: !120 = !{!107, !108} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 37, type: !83, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !145) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !6) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 2, scope: !136, type: !6) -// CHECK:STDOUT: !143 = !DILocation(line: 38, column: 3, scope: !136) -// CHECK:STDOUT: !144 = !DILocation(line: 37, column: 1, scope: !136) -// CHECK:STDOUT: !145 = !{!137, !138} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 48, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !167) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !6) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 2, scope: !146, type: !6) -// CHECK:STDOUT: !153 = !DILocation(line: 49, column: 7, scope: !146) -// CHECK:STDOUT: !154 = !DILocation(line: 49, column: 6, scope: !146) -// CHECK:STDOUT: !156 = !DILocation(line: 50, column: 5, scope: !146) -// CHECK:STDOUT: !157 = !DILocation(line: 52, column: 7, scope: !146) -// CHECK:STDOUT: !158 = !DILocation(line: 52, column: 6, scope: !146) -// CHECK:STDOUT: !161 = !DILocation(line: 53, column: 12, scope: !146) -// CHECK:STDOUT: !162 = !DILocation(line: 53, column: 5, scope: !146) -// CHECK:STDOUT: !165 = !DILocation(line: 55, column: 12, scope: !146) -// CHECK:STDOUT: !166 = !DILocation(line: 55, column: 5, scope: !146) -// CHECK:STDOUT: !167 = !{!147, !148} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 37, type: !100, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !9) -// CHECK:STDOUT: !170 = !DILocalVariable(arg: 2, scope: !168, type: !6) -// CHECK:STDOUT: !175 = !DILocation(line: 38, column: 3, scope: !168) -// CHECK:STDOUT: !176 = !DILocation(line: 37, column: 1, scope: !168) -// CHECK:STDOUT: !177 = !{!169, !170} -// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !199) -// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !9) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !6) -// CHECK:STDOUT: !185 = !DILocation(line: 49, column: 7, scope: !178) -// CHECK:STDOUT: !186 = !DILocation(line: 49, column: 6, scope: !178) -// CHECK:STDOUT: !188 = !DILocation(line: 50, column: 5, scope: !178) -// CHECK:STDOUT: !189 = !DILocation(line: 52, column: 7, scope: !178) -// CHECK:STDOUT: !190 = !DILocation(line: 52, column: 6, scope: !178) -// CHECK:STDOUT: !193 = !DILocation(line: 53, column: 12, scope: !178) -// CHECK:STDOUT: !194 = !DILocation(line: 53, column: 5, scope: !178) -// CHECK:STDOUT: !197 = !DILocation(line: 55, column: 12, scope: !178) -// CHECK:STDOUT: !198 = !DILocation(line: 55, column: 5, scope: !178) -// CHECK:STDOUT: !199 = !{!179, !180} -// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.a76b78461416b4a8", scope: null, file: !4, line: 37, type: !100, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !209) -// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !9) -// CHECK:STDOUT: !202 = !DILocalVariable(arg: 2, scope: !200, type: !6) -// CHECK:STDOUT: !207 = !DILocation(line: 38, column: 3, scope: !200) -// CHECK:STDOUT: !208 = !DILocation(line: 37, column: 1, scope: !200) -// CHECK:STDOUT: !209 = !{!201, !202} -// CHECK:STDOUT: !210 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.a76b78461416b4a8", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !231) -// CHECK:STDOUT: !211 = !DILocalVariable(arg: 1, scope: !210, type: !9) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 2, scope: !210, type: !6) -// CHECK:STDOUT: !217 = !DILocation(line: 49, column: 7, scope: !210) -// CHECK:STDOUT: !218 = !DILocation(line: 49, column: 6, scope: !210) -// CHECK:STDOUT: !220 = !DILocation(line: 50, column: 5, scope: !210) -// CHECK:STDOUT: !221 = !DILocation(line: 52, column: 7, scope: !210) -// CHECK:STDOUT: !222 = !DILocation(line: 52, column: 6, scope: !210) -// CHECK:STDOUT: !225 = !DILocation(line: 53, column: 12, scope: !210) -// CHECK:STDOUT: !226 = !DILocation(line: 53, column: 5, scope: !210) -// CHECK:STDOUT: !229 = !DILocation(line: 55, column: 12, scope: !210) -// CHECK:STDOUT: !230 = !DILocation(line: 55, column: 5, scope: !210) -// CHECK:STDOUT: !231 = !{!211, !212} -// CHECK:STDOUT: !264 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 41, type: !83, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !278) -// CHECK:STDOUT: !265 = !DILocalVariable(arg: 1, scope: !264, type: !6) -// CHECK:STDOUT: !266 = !DILocalVariable(arg: 2, scope: !264, type: !6) -// CHECK:STDOUT: !269 = !DILocation(line: 42, column: 7, scope: !264) -// CHECK:STDOUT: !270 = !DILocation(line: 42, column: 6, scope: !264) -// CHECK:STDOUT: !272 = !DILocation(line: 43, column: 5, scope: !264) -// CHECK:STDOUT: !274 = !DILocation(line: 44, column: 10, scope: !264) -// CHECK:STDOUT: !275 = !DILocation(line: 44, column: 5, scope: !264) -// CHECK:STDOUT: !276 = !DILocation(line: 42, column: 3, scope: !264) -// CHECK:STDOUT: !277 = !DILocation(line: 41, column: 1, scope: !264) -// CHECK:STDOUT: !278 = !{!265, !266} -// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 61, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !290) -// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !6) -// CHECK:STDOUT: !281 = !DILocalVariable(arg: 2, scope: !279, type: !6) -// CHECK:STDOUT: !288 = !DILocation(line: 62, column: 10, scope: !279) -// CHECK:STDOUT: !289 = !DILocation(line: 62, column: 3, scope: !279) -// CHECK:STDOUT: !290 = !{!280, !281} -// CHECK:STDOUT: !291 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 65, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !302) -// CHECK:STDOUT: !292 = !DILocalVariable(arg: 1, scope: !291, type: !6) -// CHECK:STDOUT: !293 = !DILocalVariable(arg: 2, scope: !291, type: !6) -// CHECK:STDOUT: !300 = !DILocation(line: 66, column: 10, scope: !291) -// CHECK:STDOUT: !301 = !DILocation(line: 66, column: 3, scope: !291) -// CHECK:STDOUT: !302 = !{!292, !293} -// CHECK:STDOUT: !303 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 41, type: !100, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !317) -// CHECK:STDOUT: !304 = !DILocalVariable(arg: 1, scope: !303, type: !9) -// CHECK:STDOUT: !305 = !DILocalVariable(arg: 2, scope: !303, type: !6) -// CHECK:STDOUT: !308 = !DILocation(line: 42, column: 7, scope: !303) -// CHECK:STDOUT: !309 = !DILocation(line: 42, column: 6, scope: !303) -// CHECK:STDOUT: !311 = !DILocation(line: 43, column: 5, scope: !303) -// CHECK:STDOUT: !313 = !DILocation(line: 44, column: 10, scope: !303) -// CHECK:STDOUT: !314 = !DILocation(line: 44, column: 5, scope: !303) -// CHECK:STDOUT: !315 = !DILocation(line: 42, column: 3, scope: !303) -// CHECK:STDOUT: !316 = !DILocation(line: 41, column: 1, scope: !303) -// CHECK:STDOUT: !317 = !{!304, !305} -// CHECK:STDOUT: !318 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !329) -// CHECK:STDOUT: !319 = !DILocalVariable(arg: 1, scope: !318, type: !9) -// CHECK:STDOUT: !320 = !DILocalVariable(arg: 2, scope: !318, type: !6) -// CHECK:STDOUT: !327 = !DILocation(line: 62, column: 10, scope: !318) -// CHECK:STDOUT: !328 = !DILocation(line: 62, column: 3, scope: !318) -// CHECK:STDOUT: !329 = !{!319, !320} -// CHECK:STDOUT: !330 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !341) -// CHECK:STDOUT: !331 = !DILocalVariable(arg: 1, scope: !330, type: !9) -// CHECK:STDOUT: !332 = !DILocalVariable(arg: 2, scope: !330, type: !6) -// CHECK:STDOUT: !339 = !DILocation(line: 66, column: 10, scope: !330) -// CHECK:STDOUT: !340 = !DILocation(line: 66, column: 3, scope: !330) -// CHECK:STDOUT: !341 = !{!331, !332} -// CHECK:STDOUT: !342 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.a76b78461416b4a8", scope: null, file: !4, line: 41, type: !100, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !356) -// CHECK:STDOUT: !343 = !DILocalVariable(arg: 1, scope: !342, type: !9) -// CHECK:STDOUT: !344 = !DILocalVariable(arg: 2, scope: !342, type: !6) -// CHECK:STDOUT: !347 = !DILocation(line: 42, column: 7, scope: !342) -// CHECK:STDOUT: !348 = !DILocation(line: 42, column: 6, scope: !342) -// CHECK:STDOUT: !350 = !DILocation(line: 43, column: 5, scope: !342) -// CHECK:STDOUT: !352 = !DILocation(line: 44, column: 10, scope: !342) -// CHECK:STDOUT: !353 = !DILocation(line: 44, column: 5, scope: !342) -// CHECK:STDOUT: !354 = !DILocation(line: 42, column: 3, scope: !342) -// CHECK:STDOUT: !355 = !DILocation(line: 41, column: 1, scope: !342) -// CHECK:STDOUT: !356 = !{!343, !344} -// CHECK:STDOUT: !357 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.a76b78461416b4a8", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !368) -// CHECK:STDOUT: !358 = !DILocalVariable(arg: 1, scope: !357, type: !9) -// CHECK:STDOUT: !359 = !DILocalVariable(arg: 2, scope: !357, type: !6) -// CHECK:STDOUT: !366 = !DILocation(line: 62, column: 10, scope: !357) -// CHECK:STDOUT: !367 = !DILocation(line: 62, column: 3, scope: !357) -// CHECK:STDOUT: !368 = !{!358, !359} -// CHECK:STDOUT: !369 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !380) -// CHECK:STDOUT: !370 = !DILocalVariable(arg: 1, scope: !369, type: !9) -// CHECK:STDOUT: !371 = !DILocalVariable(arg: 2, scope: !369, type: !6) -// CHECK:STDOUT: !378 = !DILocation(line: 66, column: 10, scope: !369) -// CHECK:STDOUT: !379 = !DILocation(line: 66, column: 3, scope: !369) -// CHECK:STDOUT: !380 = !{!370, !371} -// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 69, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !431) -// CHECK:STDOUT: !421 = !DILocalVariable(arg: 1, scope: !420, type: !6) -// CHECK:STDOUT: !422 = !DILocalVariable(arg: 2, scope: !420, type: !6) -// CHECK:STDOUT: !428 = !DILocation(line: 70, column: 15, scope: !420) -// CHECK:STDOUT: !429 = !DILocation(line: 70, column: 10, scope: !420) -// CHECK:STDOUT: !430 = !DILocation(line: 70, column: 3, scope: !420) -// CHECK:STDOUT: !431 = !{!421, !422} -// CHECK:STDOUT: !432 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !443) -// CHECK:STDOUT: !433 = !DILocalVariable(arg: 1, scope: !432, type: !9) -// CHECK:STDOUT: !434 = !DILocalVariable(arg: 2, scope: !432, type: !6) -// CHECK:STDOUT: !440 = !DILocation(line: 70, column: 15, scope: !432) -// CHECK:STDOUT: !441 = !DILocation(line: 70, column: 10, scope: !432) -// CHECK:STDOUT: !442 = !DILocation(line: 70, column: 3, scope: !432) -// CHECK:STDOUT: !443 = !{!433, !434} -// CHECK:STDOUT: !444 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !455) -// CHECK:STDOUT: !445 = !DILocalVariable(arg: 1, scope: !444, type: !9) -// CHECK:STDOUT: !446 = !DILocalVariable(arg: 2, scope: !444, type: !6) -// CHECK:STDOUT: !452 = !DILocation(line: 70, column: 15, scope: !444) -// CHECK:STDOUT: !453 = !DILocation(line: 70, column: 10, scope: !444) -// CHECK:STDOUT: !454 = !DILocation(line: 70, column: 3, scope: !444) -// CHECK:STDOUT: !455 = !{!445, !446} +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 2, scope: !64, type: !6) +// CHECK:STDOUT: !73 = !DILocation(line: 33, column: 3, scope: !64) +// CHECK:STDOUT: !74 = !{null, !6, !6} +// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) +// CHECK:STDOUT: !78 = !DILocation(line: 34, column: 10, scope: !64) +// CHECK:STDOUT: !79 = !DILocation(line: 34, column: 3, scope: !64) +// CHECK:STDOUT: !80 = !{!65, !66} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !97) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !9) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 2, scope: !81, type: !6) +// CHECK:STDOUT: !90 = !DILocation(line: 33, column: 3, scope: !81) +// CHECK:STDOUT: !91 = !{null, !9, !6} +// CHECK:STDOUT: !92 = !DISubroutineType(types: !91) +// CHECK:STDOUT: !95 = !DILocation(line: 34, column: 10, scope: !81) +// CHECK:STDOUT: !96 = !DILocation(line: 34, column: 3, scope: !81) +// CHECK:STDOUT: !97 = !{!82, !83} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.a76b78461416b4a8", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !9) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !6) +// CHECK:STDOUT: !107 = !DILocation(line: 33, column: 3, scope: !98) +// CHECK:STDOUT: !110 = !DILocation(line: 34, column: 10, scope: !98) +// CHECK:STDOUT: !111 = !DILocation(line: 34, column: 3, scope: !98) +// CHECK:STDOUT: !112 = !{!99, !100} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 37, type: !75, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !137) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !6) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 2, scope: !128, type: !6) +// CHECK:STDOUT: !135 = !DILocation(line: 38, column: 3, scope: !128) +// CHECK:STDOUT: !136 = !DILocation(line: 37, column: 1, scope: !128) +// CHECK:STDOUT: !137 = !{!129, !130} +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 48, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !6) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 2, scope: !138, type: !6) +// CHECK:STDOUT: !145 = !DILocation(line: 49, column: 7, scope: !138) +// CHECK:STDOUT: !146 = !DILocation(line: 49, column: 6, scope: !138) +// CHECK:STDOUT: !148 = !DILocation(line: 50, column: 5, scope: !138) +// CHECK:STDOUT: !149 = !DILocation(line: 52, column: 7, scope: !138) +// CHECK:STDOUT: !150 = !DILocation(line: 52, column: 6, scope: !138) +// CHECK:STDOUT: !153 = !DILocation(line: 53, column: 12, scope: !138) +// CHECK:STDOUT: !154 = !DILocation(line: 53, column: 5, scope: !138) +// CHECK:STDOUT: !157 = !DILocation(line: 55, column: 12, scope: !138) +// CHECK:STDOUT: !158 = !DILocation(line: 55, column: 5, scope: !138) +// CHECK:STDOUT: !159 = !{!139, !140} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 37, type: !92, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !9) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 2, scope: !160, type: !6) +// CHECK:STDOUT: !167 = !DILocation(line: 38, column: 3, scope: !160) +// CHECK:STDOUT: !168 = !DILocation(line: 37, column: 1, scope: !160) +// CHECK:STDOUT: !169 = !{!161, !162} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !9) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 2, scope: !170, type: !6) +// CHECK:STDOUT: !177 = !DILocation(line: 49, column: 7, scope: !170) +// CHECK:STDOUT: !178 = !DILocation(line: 49, column: 6, scope: !170) +// CHECK:STDOUT: !180 = !DILocation(line: 50, column: 5, scope: !170) +// CHECK:STDOUT: !181 = !DILocation(line: 52, column: 7, scope: !170) +// CHECK:STDOUT: !182 = !DILocation(line: 52, column: 6, scope: !170) +// CHECK:STDOUT: !185 = !DILocation(line: 53, column: 12, scope: !170) +// CHECK:STDOUT: !186 = !DILocation(line: 53, column: 5, scope: !170) +// CHECK:STDOUT: !189 = !DILocation(line: 55, column: 12, scope: !170) +// CHECK:STDOUT: !190 = !DILocation(line: 55, column: 5, scope: !170) +// CHECK:STDOUT: !191 = !{!171, !172} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.a76b78461416b4a8", scope: null, file: !4, line: 37, type: !92, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !201) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !9) +// CHECK:STDOUT: !194 = !DILocalVariable(arg: 2, scope: !192, type: !6) +// CHECK:STDOUT: !199 = !DILocation(line: 38, column: 3, scope: !192) +// CHECK:STDOUT: !200 = !DILocation(line: 37, column: 1, scope: !192) +// CHECK:STDOUT: !201 = !{!193, !194} +// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.a76b78461416b4a8", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !223) +// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !9) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 2, scope: !202, type: !6) +// CHECK:STDOUT: !209 = !DILocation(line: 49, column: 7, scope: !202) +// CHECK:STDOUT: !210 = !DILocation(line: 49, column: 6, scope: !202) +// CHECK:STDOUT: !212 = !DILocation(line: 50, column: 5, scope: !202) +// CHECK:STDOUT: !213 = !DILocation(line: 52, column: 7, scope: !202) +// CHECK:STDOUT: !214 = !DILocation(line: 52, column: 6, scope: !202) +// CHECK:STDOUT: !217 = !DILocation(line: 53, column: 12, scope: !202) +// CHECK:STDOUT: !218 = !DILocation(line: 53, column: 5, scope: !202) +// CHECK:STDOUT: !221 = !DILocation(line: 55, column: 12, scope: !202) +// CHECK:STDOUT: !222 = !DILocation(line: 55, column: 5, scope: !202) +// CHECK:STDOUT: !223 = !{!203, !204} +// CHECK:STDOUT: !256 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 41, type: !75, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !270) +// CHECK:STDOUT: !257 = !DILocalVariable(arg: 1, scope: !256, type: !6) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 2, scope: !256, type: !6) +// CHECK:STDOUT: !261 = !DILocation(line: 42, column: 7, scope: !256) +// CHECK:STDOUT: !262 = !DILocation(line: 42, column: 6, scope: !256) +// CHECK:STDOUT: !264 = !DILocation(line: 43, column: 5, scope: !256) +// CHECK:STDOUT: !266 = !DILocation(line: 44, column: 10, scope: !256) +// CHECK:STDOUT: !267 = !DILocation(line: 44, column: 5, scope: !256) +// CHECK:STDOUT: !268 = !DILocation(line: 42, column: 3, scope: !256) +// CHECK:STDOUT: !269 = !DILocation(line: 41, column: 1, scope: !256) +// CHECK:STDOUT: !270 = !{!257, !258} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 61, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !282) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !6) +// CHECK:STDOUT: !273 = !DILocalVariable(arg: 2, scope: !271, type: !6) +// CHECK:STDOUT: !280 = !DILocation(line: 62, column: 10, scope: !271) +// CHECK:STDOUT: !281 = !DILocation(line: 62, column: 3, scope: !271) +// CHECK:STDOUT: !282 = !{!272, !273} +// CHECK:STDOUT: !283 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 65, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !294) +// CHECK:STDOUT: !284 = !DILocalVariable(arg: 1, scope: !283, type: !6) +// CHECK:STDOUT: !285 = !DILocalVariable(arg: 2, scope: !283, type: !6) +// CHECK:STDOUT: !292 = !DILocation(line: 66, column: 10, scope: !283) +// CHECK:STDOUT: !293 = !DILocation(line: 66, column: 3, scope: !283) +// CHECK:STDOUT: !294 = !{!284, !285} +// CHECK:STDOUT: !295 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 41, type: !92, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !309) +// CHECK:STDOUT: !296 = !DILocalVariable(arg: 1, scope: !295, type: !9) +// CHECK:STDOUT: !297 = !DILocalVariable(arg: 2, scope: !295, type: !6) +// CHECK:STDOUT: !300 = !DILocation(line: 42, column: 7, scope: !295) +// CHECK:STDOUT: !301 = !DILocation(line: 42, column: 6, scope: !295) +// CHECK:STDOUT: !303 = !DILocation(line: 43, column: 5, scope: !295) +// CHECK:STDOUT: !305 = !DILocation(line: 44, column: 10, scope: !295) +// CHECK:STDOUT: !306 = !DILocation(line: 44, column: 5, scope: !295) +// CHECK:STDOUT: !307 = !DILocation(line: 42, column: 3, scope: !295) +// CHECK:STDOUT: !308 = !DILocation(line: 41, column: 1, scope: !295) +// CHECK:STDOUT: !309 = !{!296, !297} +// CHECK:STDOUT: !310 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !321) +// CHECK:STDOUT: !311 = !DILocalVariable(arg: 1, scope: !310, type: !9) +// CHECK:STDOUT: !312 = !DILocalVariable(arg: 2, scope: !310, type: !6) +// CHECK:STDOUT: !319 = !DILocation(line: 62, column: 10, scope: !310) +// CHECK:STDOUT: !320 = !DILocation(line: 62, column: 3, scope: !310) +// CHECK:STDOUT: !321 = !{!311, !312} +// CHECK:STDOUT: !322 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !333) +// CHECK:STDOUT: !323 = !DILocalVariable(arg: 1, scope: !322, type: !9) +// CHECK:STDOUT: !324 = !DILocalVariable(arg: 2, scope: !322, type: !6) +// CHECK:STDOUT: !331 = !DILocation(line: 66, column: 10, scope: !322) +// CHECK:STDOUT: !332 = !DILocation(line: 66, column: 3, scope: !322) +// CHECK:STDOUT: !333 = !{!323, !324} +// CHECK:STDOUT: !334 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.a76b78461416b4a8", scope: null, file: !4, line: 41, type: !92, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !348) +// CHECK:STDOUT: !335 = !DILocalVariable(arg: 1, scope: !334, type: !9) +// CHECK:STDOUT: !336 = !DILocalVariable(arg: 2, scope: !334, type: !6) +// CHECK:STDOUT: !339 = !DILocation(line: 42, column: 7, scope: !334) +// CHECK:STDOUT: !340 = !DILocation(line: 42, column: 6, scope: !334) +// CHECK:STDOUT: !342 = !DILocation(line: 43, column: 5, scope: !334) +// CHECK:STDOUT: !344 = !DILocation(line: 44, column: 10, scope: !334) +// CHECK:STDOUT: !345 = !DILocation(line: 44, column: 5, scope: !334) +// CHECK:STDOUT: !346 = !DILocation(line: 42, column: 3, scope: !334) +// CHECK:STDOUT: !347 = !DILocation(line: 41, column: 1, scope: !334) +// CHECK:STDOUT: !348 = !{!335, !336} +// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.a76b78461416b4a8", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !360) +// CHECK:STDOUT: !350 = !DILocalVariable(arg: 1, scope: !349, type: !9) +// CHECK:STDOUT: !351 = !DILocalVariable(arg: 2, scope: !349, type: !6) +// CHECK:STDOUT: !358 = !DILocation(line: 62, column: 10, scope: !349) +// CHECK:STDOUT: !359 = !DILocation(line: 62, column: 3, scope: !349) +// CHECK:STDOUT: !360 = !{!350, !351} +// CHECK:STDOUT: !361 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !372) +// CHECK:STDOUT: !362 = !DILocalVariable(arg: 1, scope: !361, type: !9) +// CHECK:STDOUT: !363 = !DILocalVariable(arg: 2, scope: !361, type: !6) +// CHECK:STDOUT: !370 = !DILocation(line: 66, column: 10, scope: !361) +// CHECK:STDOUT: !371 = !DILocation(line: 66, column: 3, scope: !361) +// CHECK:STDOUT: !372 = !{!362, !363} +// CHECK:STDOUT: !412 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !4, line: 69, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !423) +// CHECK:STDOUT: !413 = !DILocalVariable(arg: 1, scope: !412, type: !6) +// CHECK:STDOUT: !414 = !DILocalVariable(arg: 2, scope: !412, type: !6) +// CHECK:STDOUT: !420 = !DILocation(line: 70, column: 15, scope: !412) +// CHECK:STDOUT: !421 = !DILocation(line: 70, column: 10, scope: !412) +// CHECK:STDOUT: !422 = !DILocation(line: 70, column: 3, scope: !412) +// CHECK:STDOUT: !423 = !{!413, !414} +// CHECK:STDOUT: !424 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !435) +// CHECK:STDOUT: !425 = !DILocalVariable(arg: 1, scope: !424, type: !9) +// CHECK:STDOUT: !426 = !DILocalVariable(arg: 2, scope: !424, type: !6) +// CHECK:STDOUT: !432 = !DILocation(line: 70, column: 15, scope: !424) +// CHECK:STDOUT: !433 = !DILocation(line: 70, column: 10, scope: !424) +// CHECK:STDOUT: !434 = !DILocation(line: 70, column: 3, scope: !424) +// CHECK:STDOUT: !435 = !{!425, !426} +// CHECK:STDOUT: !436 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !447) +// CHECK:STDOUT: !437 = !DILocalVariable(arg: 1, scope: !436, type: !9) +// CHECK:STDOUT: !438 = !DILocalVariable(arg: 2, scope: !436, type: !6) +// CHECK:STDOUT: !444 = !DILocation(line: 70, column: 15, scope: !436) +// CHECK:STDOUT: !445 = !DILocation(line: 70, column: 10, scope: !436) +// CHECK:STDOUT: !446 = !DILocation(line: 70, column: 3, scope: !436) +// CHECK:STDOUT: !447 = !{!437, !438} // CHECK:STDOUT: 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 6efb5db569be..693d8a854983 100644 --- a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon +++ b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon @@ -57,207 +57,186 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !51 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !57 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !61 +// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !65 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !71 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !75 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !51 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !51 +// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !53 +// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc34_5), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !57 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !57 +// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !59 +// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc36_5), !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !61 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !61 +// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !63 +// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc38_5), !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !65 +// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !65 +// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !67 +// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %.loc40_5), !dbg !68 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !71 +// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !71 +// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !73 +// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.c5e4ba542a56b71f(double %.loc42_5), !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !75 +// CHECK:STDOUT: %F.call.loc44 = call %type.26 @_CF.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !77 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !75 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !71 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %var_i32.var), !dbg !65 +// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !57 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !55 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !61 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !65 -// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !69 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !75 -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !79 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !55 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !55 -// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !57 -// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc34_5), !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !61 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !61 -// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !63 -// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc36_5), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !65 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !65 -// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !67 -// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.a76b78461416b4a8(ptr %.loc38_5), !dbg !68 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !69 -// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !69 -// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !71 -// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.4d6ceefeb7f772f4(i32 %.loc40_5), !dbg !72 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !75 -// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !75 -// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !77 -// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.c5e4ba542a56b71f(double %.loc42_5), !dbg !78 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !79 -// CHECK:STDOUT: %F.call.loc44 = call %type.26 @_CF.Main.c3359c2c217ad593(%type.26 zeroinitializer), !dbg !81 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !79 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %var_f64.var), !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %var_i32.var), !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !95 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !105 // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.749b51755634ad17:core.Destroy.Core"(ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !113 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !115 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !117 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !119 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.a76b78461416b4a8(ptr %x) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x), !dbg !125 -// CHECK:STDOUT: ret ptr %G.call, !dbg !126 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.a76b78461416b4a8(ptr %x), !dbg !113 +// CHECK:STDOUT: ret ptr %G.call, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !146 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !134 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x), !dbg !152 -// CHECK:STDOUT: ret i32 %G.call, !dbg !153 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x), !dbg !140 +// CHECK:STDOUT: ret i32 %G.call, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x) #0 !dbg !155 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.c5e4ba542a56b71f(double %x) #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x), !dbg !161 -// CHECK:STDOUT: ret double %G.call, !dbg !162 +// CHECK:STDOUT: %G.call = call double @_CG.Main.c5e4ba542a56b71f(double %x), !dbg !149 +// CHECK:STDOUT: ret double %G.call, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CF.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !164 { +// CHECK:STDOUT: define linkonce_odr %type.26 @_CF.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !152 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x), !dbg !170 -// CHECK:STDOUT: ret %type.26 %G.call, !dbg !171 +// CHECK:STDOUT: %G.call = call %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x), !dbg !158 +// CHECK:STDOUT: ret %type.26 %G.call, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x) #0 !dbg !173 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.a76b78461416b4a8(ptr %x) #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !178 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !178 -// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %c.var, ptr %x), !dbg !180 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !178 -// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !184 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !166 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !166 +// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %c.var, ptr %x), !dbg !168 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !166 +// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !172 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !208 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.4d6ceefeb7f772f4(i32 %x) #0 !dbg !196 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !213 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !213 -// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %c.var, i32 %x), !dbg !215 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !213 -// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !219 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !201 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !201 +// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %c.var, i32 %x), !dbg !203 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !201 +// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x) #0 !dbg !221 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.c5e4ba542a56b71f(double %x) #0 !dbg !209 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !226 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !226 -// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %c.var, double %x), !dbg !228 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !226 -// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !230 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !214 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !214 +// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %c.var, double %x), !dbg !216 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !214 +// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !218 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !232 { +// CHECK:STDOUT: define linkonce_odr %type.26 @_CG.Main.c3359c2c217ad593(%type.26 %x) #0 !dbg !220 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !237 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !237 -// CHECK:STDOUT: %C.Cfn.call = call %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.26 %x), !dbg !239 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !237 -// CHECK:STDOUT: ret %type.26 %C.Cfn.call, !dbg !241 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !225 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !225 +// CHECK:STDOUT: %C.Cfn.call = call %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.26 %x), !dbg !227 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !225 +// CHECK:STDOUT: ret %type.26 %C.Cfn.call, !dbg !229 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %self, ptr %x) #0 !dbg !243 { +// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.a76b78461416b4a8(ptr %self, ptr %x) #0 !dbg !231 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !251 +// CHECK:STDOUT: ret ptr %x, !dbg !239 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !273 { +// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.4d6ceefeb7f772f4(ptr %self, i32 %x) #0 !dbg !261 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !281 +// CHECK:STDOUT: ret i32 %x, !dbg !269 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %self, double %x) #0 !dbg !283 { +// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.c5e4ba542a56b71f(ptr %self, double %x) #0 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !291 +// CHECK:STDOUT: ret double %x, !dbg !279 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.26 %x) #0 !dbg !293 { +// CHECK:STDOUT: define linkonce_odr %type.26 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.26 %x) #0 !dbg !281 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.26 %x, !dbg !301 +// CHECK:STDOUT: ret %type.26 %x, !dbg !289 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -286,139 +265,127 @@ fn M() { // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !35) // CHECK:STDOUT: !44 = !DILocation(line: 24, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !49) // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !35) // CHECK:STDOUT: !48 = !DILocation(line: 24, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 24, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !35) -// CHECK:STDOUT: !52 = !DILocation(line: 24, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !55 = !DILocation(line: 33, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !DILocation(line: 34, column: 5, scope: !54) -// CHECK:STDOUT: !58 = !DILocation(line: 34, column: 3, scope: !54) -// CHECK:STDOUT: !59 = !{!35, !35} -// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !61 = !DILocation(line: 35, column: 3, scope: !54) -// CHECK:STDOUT: !63 = !DILocation(line: 36, column: 5, scope: !54) -// CHECK:STDOUT: !64 = !DILocation(line: 36, column: 3, scope: !54) -// CHECK:STDOUT: !65 = !DILocation(line: 37, column: 3, scope: !54) -// CHECK:STDOUT: !67 = !DILocation(line: 38, column: 5, scope: !54) -// CHECK:STDOUT: !68 = !DILocation(line: 38, column: 3, scope: !54) -// CHECK:STDOUT: !69 = !DILocation(line: 39, column: 3, scope: !54) -// CHECK:STDOUT: !71 = !DILocation(line: 40, column: 5, scope: !54) -// CHECK:STDOUT: !72 = !DILocation(line: 40, column: 3, scope: !54) -// CHECK:STDOUT: !73 = !{!34, !34} -// CHECK:STDOUT: !74 = !DISubroutineType(types: !73) -// CHECK:STDOUT: !75 = !DILocation(line: 41, column: 3, scope: !54) -// CHECK:STDOUT: !77 = !DILocation(line: 42, column: 5, scope: !54) -// CHECK:STDOUT: !78 = !DILocation(line: 42, column: 3, scope: !54) -// CHECK:STDOUT: !79 = !DILocation(line: 43, column: 3, scope: !54) -// CHECK:STDOUT: !81 = !DILocation(line: 44, column: 3, scope: !54) -// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !54) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !32, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !33) +// CHECK:STDOUT: !51 = !DILocation(line: 33, column: 3, scope: !50) +// CHECK:STDOUT: !53 = !DILocation(line: 34, column: 5, scope: !50) +// CHECK:STDOUT: !54 = !DILocation(line: 34, column: 3, scope: !50) +// CHECK:STDOUT: !55 = !{!35, !35} +// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) +// CHECK:STDOUT: !57 = !DILocation(line: 35, column: 3, scope: !50) +// CHECK:STDOUT: !59 = !DILocation(line: 36, column: 5, scope: !50) +// CHECK:STDOUT: !60 = !DILocation(line: 36, column: 3, scope: !50) +// CHECK:STDOUT: !61 = !DILocation(line: 37, column: 3, scope: !50) +// CHECK:STDOUT: !63 = !DILocation(line: 38, column: 5, scope: !50) +// CHECK:STDOUT: !64 = !DILocation(line: 38, column: 3, scope: !50) +// CHECK:STDOUT: !65 = !DILocation(line: 39, column: 3, scope: !50) +// CHECK:STDOUT: !67 = !DILocation(line: 40, column: 5, scope: !50) +// CHECK:STDOUT: !68 = !DILocation(line: 40, column: 3, scope: !50) +// CHECK:STDOUT: !69 = !{!34, !34} +// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) +// CHECK:STDOUT: !71 = !DILocation(line: 41, column: 3, scope: !50) +// CHECK:STDOUT: !73 = !DILocation(line: 42, column: 5, scope: !50) +// CHECK:STDOUT: !74 = !DILocation(line: 42, column: 3, scope: !50) +// CHECK:STDOUT: !75 = !DILocation(line: 43, column: 3, scope: !50) +// CHECK:STDOUT: !77 = !DILocation(line: 44, column: 3, scope: !50) +// CHECK:STDOUT: !78 = !DILocation(line: 32, column: 1, scope: !50) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !35) +// CHECK:STDOUT: !81 = !DILocation(line: 41, column: 3, scope: !79) +// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !35) // CHECK:STDOUT: !85 = !DILocation(line: 41, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !35) -// CHECK:STDOUT: !89 = !DILocation(line: 41, column: 3, scope: !87) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !90) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !34) +// CHECK:STDOUT: !89 = !DILocation(line: 39, column: 3, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 41, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !35) -// CHECK:STDOUT: !93 = !DILocation(line: 41, column: 3, scope: !91) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !94) +// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !34) +// CHECK:STDOUT: !93 = !DILocation(line: 39, column: 3, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !34) -// CHECK:STDOUT: !97 = !DILocation(line: 39, column: 3, scope: !95) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 37, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !98) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !35) +// CHECK:STDOUT: !97 = !DILocation(line: 37, column: 3, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !34) -// CHECK:STDOUT: !101 = !DILocation(line: 39, column: 3, scope: !99) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !102) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !35) +// CHECK:STDOUT: !101 = !DILocation(line: 35, column: 3, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 39, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !34) -// CHECK:STDOUT: !105 = !DILocation(line: 39, column: 3, scope: !103) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 33, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !106) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !35) +// CHECK:STDOUT: !105 = !DILocation(line: 33, column: 3, scope: !103) // CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de57ff04fd84f9c8:core.Destroy.Core", scope: null, file: !32, line: 37, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !115) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !35) -// CHECK:STDOUT: !109 = !DILocation(line: 37, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.749b51755634ad17:core.Destroy.Core", scope: null, file: !32, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !114) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !35) -// CHECK:STDOUT: !113 = !DILocation(line: 35, column: 3, scope: !111) -// CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !32, line: 33, type: !37, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !118) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !35) -// CHECK:STDOUT: !117 = !DILocation(line: 33, column: 3, scope: !115) -// CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a76b78461416b4a8", scope: null, file: !32, line: 28, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !127) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !35) -// CHECK:STDOUT: !125 = !DILocation(line: 29, column: 10, scope: !119) -// CHECK:STDOUT: !126 = !DILocation(line: 29, column: 3, scope: !119) -// CHECK:STDOUT: !127 = !{!120} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 28, type: !74, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !154) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !34) -// CHECK:STDOUT: !152 = !DILocation(line: 29, column: 10, scope: !146) -// CHECK:STDOUT: !153 = !DILocation(line: 29, column: 3, scope: !146) -// CHECK:STDOUT: !154 = !{!147} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 28, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !163) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !35) -// CHECK:STDOUT: !161 = !DILocation(line: 29, column: 10, scope: !155) -// CHECK:STDOUT: !162 = !DILocation(line: 29, column: 3, scope: !155) -// CHECK:STDOUT: !163 = !{!156} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !32, line: 28, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !172) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !35) -// CHECK:STDOUT: !170 = !DILocation(line: 29, column: 10, scope: !164) -// CHECK:STDOUT: !171 = !DILocation(line: 29, column: 3, scope: !164) -// CHECK:STDOUT: !172 = !{!165} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !32, line: 23, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !185) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !35) -// CHECK:STDOUT: !178 = !DILocation(line: 24, column: 3, scope: !173) -// CHECK:STDOUT: !180 = !DILocation(line: 25, column: 10, scope: !173) -// CHECK:STDOUT: !182 = !{!35, !35, !35} -// CHECK:STDOUT: !183 = !DISubroutineType(types: !182) -// CHECK:STDOUT: !184 = !DILocation(line: 25, column: 3, scope: !173) -// CHECK:STDOUT: !185 = !{!174} -// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 23, type: !74, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !220) -// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !34) -// CHECK:STDOUT: !213 = !DILocation(line: 24, column: 3, scope: !208) -// CHECK:STDOUT: !215 = !DILocation(line: 25, column: 10, scope: !208) -// CHECK:STDOUT: !217 = !{!34, !35, !34} -// CHECK:STDOUT: !218 = !DISubroutineType(types: !217) -// CHECK:STDOUT: !219 = !DILocation(line: 25, column: 3, scope: !208) -// CHECK:STDOUT: !220 = !{!209} -// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 23, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !231) -// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !35) -// CHECK:STDOUT: !226 = !DILocation(line: 24, column: 3, scope: !221) -// CHECK:STDOUT: !228 = !DILocation(line: 25, column: 10, scope: !221) -// CHECK:STDOUT: !230 = !DILocation(line: 25, column: 3, scope: !221) -// CHECK:STDOUT: !231 = !{!222} -// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !32, line: 23, type: !60, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !242) -// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !35) -// CHECK:STDOUT: !237 = !DILocation(line: 24, column: 3, scope: !232) -// CHECK:STDOUT: !239 = !DILocation(line: 25, column: 10, scope: !232) -// CHECK:STDOUT: !241 = !DILocation(line: 25, column: 3, scope: !232) -// CHECK:STDOUT: !242 = !{!233} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.a76b78461416b4a8", scope: null, file: !32, line: 18, type: !183, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !252) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !35) -// CHECK:STDOUT: !245 = !DILocalVariable(arg: 2, scope: !243, type: !35) -// CHECK:STDOUT: !251 = !DILocation(line: 19, column: 5, scope: !243) -// CHECK:STDOUT: !252 = !{!244, !245} -// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 18, type: !218, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !282) -// CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !35) -// CHECK:STDOUT: !275 = !DILocalVariable(arg: 2, scope: !273, type: !34) -// CHECK:STDOUT: !281 = !DILocation(line: 19, column: 5, scope: !273) -// CHECK:STDOUT: !282 = !{!274, !275} -// CHECK:STDOUT: !283 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 18, type: !183, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !292) -// CHECK:STDOUT: !284 = !DILocalVariable(arg: 1, scope: !283, type: !35) -// CHECK:STDOUT: !285 = !DILocalVariable(arg: 2, scope: !283, type: !35) -// CHECK:STDOUT: !291 = !DILocation(line: 19, column: 5, scope: !283) -// CHECK:STDOUT: !292 = !{!284, !285} -// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !183, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !302) -// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !35) -// CHECK:STDOUT: !295 = !DILocalVariable(arg: 2, scope: !293, type: !35) -// CHECK:STDOUT: !301 = !DILocation(line: 19, column: 5, scope: !293) -// CHECK:STDOUT: !302 = !{!294, !295} +// CHECK:STDOUT: !113 = !DILocation(line: 29, column: 10, scope: !107) +// CHECK:STDOUT: !114 = !DILocation(line: 29, column: 3, scope: !107) +// CHECK:STDOUT: !115 = !{!108} +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 28, type: !70, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !142) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !34) +// CHECK:STDOUT: !140 = !DILocation(line: 29, column: 10, scope: !134) +// CHECK:STDOUT: !141 = !DILocation(line: 29, column: 3, scope: !134) +// CHECK:STDOUT: !142 = !{!135} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !151) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !35) +// CHECK:STDOUT: !149 = !DILocation(line: 29, column: 10, scope: !143) +// CHECK:STDOUT: !150 = !DILocation(line: 29, column: 3, scope: !143) +// CHECK:STDOUT: !151 = !{!144} +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !32, line: 28, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !160) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !35) +// CHECK:STDOUT: !158 = !DILocation(line: 29, column: 10, scope: !152) +// CHECK:STDOUT: !159 = !DILocation(line: 29, column: 3, scope: !152) +// CHECK:STDOUT: !160 = !{!153} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.a76b78461416b4a8", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !173) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !35) +// CHECK:STDOUT: !166 = !DILocation(line: 24, column: 3, scope: !161) +// CHECK:STDOUT: !168 = !DILocation(line: 25, column: 10, scope: !161) +// CHECK:STDOUT: !170 = !{!35, !35, !35} +// CHECK:STDOUT: !171 = !DISubroutineType(types: !170) +// CHECK:STDOUT: !172 = !DILocation(line: 25, column: 3, scope: !161) +// CHECK:STDOUT: !173 = !{!162} +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 23, type: !70, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !208) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !34) +// CHECK:STDOUT: !201 = !DILocation(line: 24, column: 3, scope: !196) +// CHECK:STDOUT: !203 = !DILocation(line: 25, column: 10, scope: !196) +// CHECK:STDOUT: !205 = !{!34, !35, !34} +// CHECK:STDOUT: !206 = !DISubroutineType(types: !205) +// CHECK:STDOUT: !207 = !DILocation(line: 25, column: 3, scope: !196) +// CHECK:STDOUT: !208 = !{!197} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !219) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !35) +// CHECK:STDOUT: !214 = !DILocation(line: 24, column: 3, scope: !209) +// CHECK:STDOUT: !216 = !DILocation(line: 25, column: 10, scope: !209) +// CHECK:STDOUT: !218 = !DILocation(line: 25, column: 3, scope: !209) +// CHECK:STDOUT: !219 = !{!210} +// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !32, line: 23, type: !56, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !230) +// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !35) +// CHECK:STDOUT: !225 = !DILocation(line: 24, column: 3, scope: !220) +// CHECK:STDOUT: !227 = !DILocation(line: 25, column: 10, scope: !220) +// CHECK:STDOUT: !229 = !DILocation(line: 25, column: 3, scope: !220) +// CHECK:STDOUT: !230 = !{!221} +// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.a76b78461416b4a8", scope: null, file: !32, line: 18, type: !171, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !240) +// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !35) +// CHECK:STDOUT: !233 = !DILocalVariable(arg: 2, scope: !231, type: !35) +// CHECK:STDOUT: !239 = !DILocation(line: 19, column: 5, scope: !231) +// CHECK:STDOUT: !240 = !{!232, !233} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.4d6ceefeb7f772f4", scope: null, file: !32, line: 18, type: !206, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !270) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !35) +// CHECK:STDOUT: !263 = !DILocalVariable(arg: 2, scope: !261, type: !34) +// CHECK:STDOUT: !269 = !DILocation(line: 19, column: 5, scope: !261) +// CHECK:STDOUT: !270 = !{!262, !263} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c5e4ba542a56b71f", scope: null, file: !32, line: 18, type: !171, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !280) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !35) +// CHECK:STDOUT: !273 = !DILocalVariable(arg: 2, scope: !271, type: !35) +// CHECK:STDOUT: !279 = !DILocation(line: 19, column: 5, scope: !271) +// CHECK:STDOUT: !280 = !{!272, !273} +// CHECK:STDOUT: !281 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !32, line: 18, type: !171, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !290) +// CHECK:STDOUT: !282 = !DILocalVariable(arg: 1, scope: !281, type: !35) +// CHECK:STDOUT: !283 = !DILocalVariable(arg: 2, scope: !281, type: !35) +// CHECK:STDOUT: !289 = !DILocation(line: 19, column: 5, scope: !281) +// CHECK:STDOUT: !290 = !{!282, !283} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/import.carbon b/toolchain/lower/testdata/function/generic/import.carbon index 23e006a5ea6c..921e04ce615f 100644 --- a/toolchain/lower/testdata/function/generic/import.carbon +++ b/toolchain/lower/testdata/function/generic/import.carbon @@ -142,27 +142,20 @@ fn Call() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !67 -// CHECK:STDOUT: ret void, !dbg !67 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CDirectGeneric.Main.84588f41d61dafba(ptr %y) #0 !dbg !69 { -// CHECK:STDOUT: call void @_CDirectDeclared.Main(), !dbg !74 -// CHECK:STDOUT: call void @_CDirectDefined.Main(), !dbg !75 -// CHECK:STDOUT: %1 = call ptr @_CIndirectGeneric.Main.84588f41d61dafba(ptr %y), !dbg !77 -// CHECK:STDOUT: ret ptr %1, !dbg !78 +// CHECK:STDOUT: define linkonce_odr ptr @_CDirectGeneric.Main.84588f41d61dafba(ptr %y) #0 !dbg !65 { +// CHECK:STDOUT: call void @_CDirectDeclared.Main(), !dbg !70 +// CHECK:STDOUT: call void @_CDirectDefined.Main(), !dbg !71 +// CHECK:STDOUT: %1 = call ptr @_CIndirectGeneric.Main.84588f41d61dafba(ptr %y), !dbg !73 +// CHECK:STDOUT: ret ptr %1, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CDirectDeclared.Main() @@ -170,10 +163,10 @@ fn Call() -> i32 { // CHECK:STDOUT: declare void @_CDirectDefined.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CIndirectGeneric.Main.84588f41d61dafba(ptr %x) #0 !dbg !80 { -// CHECK:STDOUT: call void @_CIndirectDeclared.Main(), !dbg !85 -// CHECK:STDOUT: call void @_CIndirectDefined.Main(), !dbg !86 -// CHECK:STDOUT: ret ptr %x, !dbg !88 +// CHECK:STDOUT: define linkonce_odr ptr @_CIndirectGeneric.Main.84588f41d61dafba(ptr %x) #0 !dbg !76 { +// CHECK:STDOUT: call void @_CIndirectDeclared.Main(), !dbg !81 +// CHECK:STDOUT: call void @_CIndirectDefined.Main(), !dbg !82 +// CHECK:STDOUT: ret ptr %x, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CIndirectDeclared.Main() @@ -220,25 +213,21 @@ fn Call() -> i32 { // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !30) // CHECK:STDOUT: !59 = !DILocation(line: 7, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !28, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !64) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !28, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !64) // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !30) // CHECK:STDOUT: !63 = !DILocation(line: 7, column: 3, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !28, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !30) -// CHECK:STDOUT: !67 = !DILocation(line: 7, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "DirectGeneric", linkageName: "_CDirectGeneric.Main.84588f41d61dafba", scope: null, file: !24, line: 10, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !79) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !33) -// CHECK:STDOUT: !74 = !DILocation(line: 11, column: 3, scope: !69) -// CHECK:STDOUT: !75 = !DILocation(line: 12, column: 3, scope: !69) -// CHECK:STDOUT: !77 = !DILocation(line: 13, column: 10, scope: !69) -// CHECK:STDOUT: !78 = !DILocation(line: 13, column: 3, scope: !69) -// CHECK:STDOUT: !79 = !{!70} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.84588f41d61dafba", scope: null, file: !18, line: 8, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !89) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !33) -// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 3, scope: !80) -// CHECK:STDOUT: !86 = !DILocation(line: 10, column: 3, scope: !80) -// CHECK:STDOUT: !88 = !DILocation(line: 11, column: 3, scope: !80) -// CHECK:STDOUT: !89 = !{!81} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "DirectGeneric", linkageName: "_CDirectGeneric.Main.84588f41d61dafba", scope: null, file: !24, line: 10, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !75) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !33) +// CHECK:STDOUT: !70 = !DILocation(line: 11, column: 3, scope: !65) +// CHECK:STDOUT: !71 = !DILocation(line: 12, column: 3, scope: !65) +// CHECK:STDOUT: !73 = !DILocation(line: 13, column: 10, scope: !65) +// CHECK:STDOUT: !74 = !DILocation(line: 13, column: 3, scope: !65) +// CHECK:STDOUT: !75 = !{!66} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.84588f41d61dafba", scope: null, file: !18, line: 8, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !85) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !33) +// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 3, scope: !76) +// CHECK:STDOUT: !82 = !DILocation(line: 10, column: 3, scope: !76) +// CHECK:STDOUT: !84 = !DILocation(line: 11, column: 3, scope: !76) +// CHECK:STDOUT: !85 = !{!77} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/import_core_witness.carbon b/toolchain/lower/testdata/function/generic/import_core_witness.carbon index ba16ae2cf01b..b557476dafc4 100644 --- a/toolchain/lower/testdata/function/generic/import_core_witness.carbon +++ b/toolchain/lower/testdata/function/generic/import_core_witness.carbon @@ -39,18 +39,11 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !13 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !13 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !15 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !17 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !19 -// CHECK:STDOUT: ret void, !dbg !19 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} @@ -67,39 +60,33 @@ fn Run() { // CHECK:STDOUT: !10 = !DILocalVariable(arg: 1, scope: !9, type: !6) // CHECK:STDOUT: !11 = !DILocation(line: 7, column: 3, scope: !9) // CHECK:STDOUT: !12 = !{!10} -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !16) // CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !13, type: !6) // CHECK:STDOUT: !15 = !DILocation(line: 7, column: 3, scope: !13) // CHECK:STDOUT: !16 = !{!14} -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) -// CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !17, type: !6) -// CHECK:STDOUT: !19 = !DILocation(line: 7, column: 3, scope: !17) -// CHECK:STDOUT: !20 = !{!18} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'main.carbon' // CHECK:STDOUT: source_filename = "main.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.79e272ab3b2c3188(), !dbg !26 -// CHECK:STDOUT: ret i32 0, !dbg !29 +// CHECK:STDOUT: call void @_CF.Main.79e272ab3b2c3188(), !dbg !22 +// CHECK:STDOUT: ret i32 0, !dbg !25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.79e272ab3b2c3188() #0 !dbg !30 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !31 -// CHECK:STDOUT: store i32 0, ptr %1, align 4, !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !33 +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.79e272ab3b2c3188() #0 !dbg !26 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !27 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !27 +// CHECK:STDOUT: store i32 0, ptr %1, align 4, !dbg !27 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %1), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -108,23 +95,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.dbg.cu = !{!22} +// CHECK:STDOUT: !llvm.dbg.cu = !{!18} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !4 = !DIFile(filename: "lib.carbon", directory: "") // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !21 = !DIFile(filename: "main.carbon", directory: "") -// CHECK:STDOUT: !22 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !21, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !23 = !{!6} +// CHECK:STDOUT: !17 = !DIFile(filename: "main.carbon", directory: "") +// CHECK:STDOUT: !18 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !17, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !19 = !{!6} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !17, line: 4, type: !20, spFlags: DISPFlagDefinition, unit: !18) +// CHECK:STDOUT: !22 = !DILocation(line: 5, column: 3, scope: !21) +// CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !21, line: 4, type: !24, spFlags: DISPFlagDefinition, unit: !22) -// CHECK:STDOUT: !26 = !DILocation(line: 5, column: 3, scope: !25) -// CHECK:STDOUT: !27 = !{null} -// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) -// CHECK:STDOUT: !29 = !DILocation(line: 4, column: 1, scope: !25) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.79e272ab3b2c3188", scope: null, file: !4, line: 4, type: !28, spFlags: DISPFlagDefinition, unit: !22) -// CHECK:STDOUT: !31 = !DILocation(line: 7, column: 3, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 4, column: 1, scope: !30) +// CHECK:STDOUT: !25 = !DILocation(line: 4, column: 1, scope: !21) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.79e272ab3b2c3188", scope: null, file: !4, line: 4, type: !24, spFlags: DISPFlagDefinition, unit: !18) +// CHECK:STDOUT: !27 = !DILocation(line: 7, column: 3, scope: !26) +// CHECK:STDOUT: !29 = !DILocation(line: 4, column: 1, scope: !26) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/import_unused_def.carbon b/toolchain/lower/testdata/function/generic/import_unused_def.carbon index 33ff807f044c..dd3ff5b943f7 100644 --- a/toolchain/lower/testdata/function/generic/import_unused_def.carbon +++ b/toolchain/lower/testdata/function/generic/import_unused_def.carbon @@ -57,31 +57,17 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !38 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !44 // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ed1ef26650163b11:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !48 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr %self) #0 !dbg !50 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.ed1ef26650163b11:core.Destroy.Core"(ptr %self), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !52 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!19} @@ -104,56 +90,44 @@ fn Main() { // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !20) // CHECK:STDOUT: !36 = !DILocation(line: 18, column: 3, scope: !34) // CHECK:STDOUT: !37 = !{!35} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 18, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 18, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ed1ef26650163b11:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) -// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !46) -// CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) -// CHECK:STDOUT: !52 = !DILocation(line: 18, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'b.carbon' // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !58 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GenericF.call = call i32 @_CGenericF.Main.084a2801e0f5d754({} zeroinitializer), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: %GenericF.call = call i32 @_CGenericF.Main.084a2801e0f5d754({} zeroinitializer), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGenericF.Main.084a2801e0f5d754({} %x) #0 !dbg !64 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !69 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !69 -// CHECK:STDOUT: %2 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 0), !dbg !70 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !69 -// CHECK:STDOUT: %3 = load i32, ptr %1, align 4, !dbg !72 -// CHECK:STDOUT: %4 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 %3), !dbg !72 -// CHECK:STDOUT: call void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr %1), !dbg !69 -// CHECK:STDOUT: ret i32 %4, !dbg !73 +// CHECK:STDOUT: define linkonce_odr i32 @_CGenericF.Main.084a2801e0f5d754({} %x) #0 !dbg !56 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !61 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !61 +// CHECK:STDOUT: %2 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 0), !dbg !62 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !61 +// CHECK:STDOUT: %3 = load i32, ptr %1, align 4, !dbg !64 +// CHECK:STDOUT: %4 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 %3), !dbg !64 +// CHECK:STDOUT: call void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr %1), !dbg !61 +// CHECK:STDOUT: ret i32 %4, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @"_COp.Foo.Main:Copy.Core"(i32) // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSubobjectDestroy.ed1ef26650163b11:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -165,28 +139,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.dbg.cu = !{!55} +// CHECK:STDOUT: !llvm.dbg.cu = !{!47} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !54 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !55 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !54, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !56 = !{null} -// CHECK:STDOUT: !57 = !DISubroutineType(types: !56) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !54, line: 4, type: !57, spFlags: DISPFlagDefinition, unit: !55) -// CHECK:STDOUT: !59 = !DILocation(line: 5, column: 3, scope: !58) -// CHECK:STDOUT: !60 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !61 = !{!20, !60} -// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) -// CHECK:STDOUT: !63 = !DILocation(line: 4, column: 1, scope: !58) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !18, line: 17, type: !62, spFlags: DISPFlagDefinition, unit: !55, retainedNodes: !74) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !60) -// CHECK:STDOUT: !69 = !DILocation(line: 18, column: 3, scope: !64) -// CHECK:STDOUT: !70 = !DILocation(line: 18, column: 16, scope: !64) -// CHECK:STDOUT: !72 = !DILocation(line: 19, column: 10, scope: !64) -// CHECK:STDOUT: !73 = !DILocation(line: 19, column: 3, scope: !64) -// CHECK:STDOUT: !74 = !{!65} +// CHECK:STDOUT: !46 = !DIFile(filename: "b.carbon", directory: "") +// CHECK:STDOUT: !47 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !46, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !48 = !{null} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !46, line: 4, type: !49, spFlags: DISPFlagDefinition, unit: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 5, column: 3, scope: !50) +// CHECK:STDOUT: !52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !53 = !{!20, !52} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !55 = !DILocation(line: 4, column: 1, scope: !50) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !18, line: 17, type: !54, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !66) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !52) +// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 3, scope: !56) +// CHECK:STDOUT: !62 = !DILocation(line: 18, column: 16, scope: !56) +// CHECK:STDOUT: !64 = !DILocation(line: 19, column: 10, scope: !56) +// CHECK:STDOUT: !65 = !DILocation(line: 19, column: 3, scope: !56) +// CHECK:STDOUT: !66 = !{!57} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index f3a2b589cc80..06e5cf39e84e 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -98,206 +98,199 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define void @"_COp.X.Main:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: %.loc38_24.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !62 +// CHECK:STDOUT: %.loc38_24.2 = load i32, ptr %.loc38_24.1.a, align 4, !dbg !62 +// CHECK:STDOUT: %.loc38_37.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !63 +// CHECK:STDOUT: %.loc38_37.2 = load i32, ptr %.loc38_37.1.b, align 4, !dbg !63 +// CHECK:STDOUT: %.loc38_39.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !64 +// CHECK:STDOUT: store i32 %.loc38_24.2, ptr %.loc38_39.2.a, align 4, !dbg !64 +// CHECK:STDOUT: %.loc38_39.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !64 +// CHECK:STDOUT: store i32 %.loc38_37.2, ptr %.loc38_39.4.b, align 4, !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.X.Main:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define void @_CF_X.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_24.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !66 -// CHECK:STDOUT: %.loc38_24.2 = load i32, ptr %.loc38_24.1.a, align 4, !dbg !66 -// CHECK:STDOUT: %.loc38_37.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !67 -// CHECK:STDOUT: %.loc38_37.2 = load i32, ptr %.loc38_37.1.b, align 4, !dbg !67 -// CHECK:STDOUT: %.loc38_39.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !68 -// CHECK:STDOUT: store i32 %.loc38_24.2, ptr %.loc38_39.2.a, align 4, !dbg !68 -// CHECK:STDOUT: %.loc38_39.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !68 -// CHECK:STDOUT: store i32 %.loc38_37.2, ptr %.loc38_39.4.b, align 4, !dbg !68 -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: call void @_CF.Main.9d368fc2e01d20c2(ptr %return, ptr %a), !dbg !73 +// CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF_X.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.9d368fc2e01d20c2(ptr %return, ptr %a), !dbg !77 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !82 // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !84 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !86 // CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !88 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !88 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !90 // CHECK:STDOUT: ret void, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !92 { +// CHECK:STDOUT: define void @"_COp.61ea2aba74ab3bf1:Copy.Main"() #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.61ea2aba74ab3bf1:Copy.Main"() #0 !dbg !96 { +// CHECK:STDOUT: define void @_CF_empty_tuple.Main() #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: call void @_CF.Main.a5d0440dfa027ffe(), !dbg !102 +// CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF_empty_tuple.Main() #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.a5d0440dfa027ffe(), !dbg !106 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !108 { +// CHECK:STDOUT: define void @"_COp.e554695bf635d9c1:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !113 +// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem0.loc59_12.1.tuple.elem, align 4, !dbg !113 +// CHECK:STDOUT: %tuple.elem0.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !113 +// CHECK:STDOUT: store i32 %tuple.elem0.loc59_12.1.tuple.elem.load, ptr %tuple.elem0.loc59_12.2.tuple.elem, align 4, !dbg !113 +// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !113 +// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem1.loc59_12.1.tuple.elem, align 4, !dbg !113 +// CHECK:STDOUT: %tuple.elem1.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !113 +// CHECK:STDOUT: store i32 %tuple.elem1.loc59_12.1.tuple.elem.load, ptr %tuple.elem1.loc59_12.2.tuple.elem, align 4, !dbg !113 +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.e554695bf635d9c1:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !112 { +// CHECK:STDOUT: define void @_CF_two_tuple.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !117 -// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem0.loc59_12.1.tuple.elem, align 4, !dbg !117 -// CHECK:STDOUT: %tuple.elem0.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !117 -// CHECK:STDOUT: store i32 %tuple.elem0.loc59_12.1.tuple.elem.load, ptr %tuple.elem0.loc59_12.2.tuple.elem, align 4, !dbg !117 -// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !117 -// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem1.loc59_12.1.tuple.elem, align 4, !dbg !117 -// CHECK:STDOUT: %tuple.elem1.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !117 -// CHECK:STDOUT: store i32 %tuple.elem1.loc59_12.1.tuple.elem.load, ptr %tuple.elem1.loc59_12.2.tuple.elem, align 4, !dbg !117 -// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: call void @_CF.Main.25802053f9465fe8(ptr %return, ptr %a), !dbg !122 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF_two_tuple.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !120 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !125 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.25802053f9465fe8(ptr %return, ptr %a), !dbg !126 // CHECK:STDOUT: ret void, !dbg !127 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !129 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !129 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !131 // CHECK:STDOUT: ret void, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !133 { +// CHECK:STDOUT: define void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %self) #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !135 -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 0, !dbg !138 +// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem.load = load ptr, ptr %tuple.elem0.loc69_17.tuple.elem, align 8, !dbg !138 +// CHECK:STDOUT: %tuple.elem0.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !139 +// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %tuple.elem0.loc69_51.tuple.elem, ptr %tuple.elem0.loc69_17.tuple.elem.load), !dbg !138 +// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 1, !dbg !140 +// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem.load = load ptr, ptr %tuple.elem1.loc69_37.tuple.elem, align 8, !dbg !140 +// CHECK:STDOUT: %tuple.elem1.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !139 +// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %tuple.elem1.loc69_51.tuple.elem, ptr %tuple.elem1.loc69_37.tuple.elem.load), !dbg !140 +// CHECK:STDOUT: ret void, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %self) #0 !dbg !137 { +// CHECK:STDOUT: define void @_CF_nested_tuple.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 0, !dbg !142 -// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem.load = load ptr, ptr %tuple.elem0.loc69_17.tuple.elem, align 8, !dbg !142 -// CHECK:STDOUT: %tuple.elem0.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !143 -// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %tuple.elem0.loc69_51.tuple.elem, ptr %tuple.elem0.loc69_17.tuple.elem.load), !dbg !142 -// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 1, !dbg !144 -// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem.load = load ptr, ptr %tuple.elem1.loc69_37.tuple.elem, align 8, !dbg !144 -// CHECK:STDOUT: %tuple.elem1.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !143 -// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %tuple.elem1.loc69_51.tuple.elem, ptr %tuple.elem1.loc69_37.tuple.elem.load), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: call void @_CF.Main.f37d80e656707351(ptr %return, ptr %a), !dbg !149 +// CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF_nested_tuple.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core"(ptr %self) #0 !dbg !152 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.f37d80e656707351(ptr %return, ptr %a), !dbg !153 // CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core"(ptr %self) #0 !dbg !156 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core"(ptr %self) #0 !dbg !156 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core"(ptr %self), !dbg !158 // CHECK:STDOUT: ret void, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core"(ptr %self) #0 !dbg !160 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.804fd121057d1d93(i32 %a) #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core"(ptr %self), !dbg !162 -// CHECK:STDOUT: ret void, !dbg !162 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !165 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !165 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !166 +// CHECK:STDOUT: store i32 %Copy.WithSelf.Op.call.loc18, ptr %_.var, align 4, !dbg !165 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !168 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !165 +// CHECK:STDOUT: ret i32 %Copy.WithSelf.Op.call.loc19, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.804fd121057d1d93(i32 %a) #0 !dbg !164 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9d368fc2e01d20c2(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !169 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !169 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !170 -// CHECK:STDOUT: store i32 %Copy.WithSelf.Op.call.loc18, ptr %_.var, align 4, !dbg !169 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !172 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !169 -// CHECK:STDOUT: ret i32 %Copy.WithSelf.Op.call.loc19, !dbg !173 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !176 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !176 +// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %_.var, ptr %a), !dbg !177 +// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %return, ptr %a), !dbg !179 +// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var), !dbg !176 +// CHECK:STDOUT: ret void, !dbg !180 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9d368fc2e01d20c2(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !175 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.a5d0440dfa027ffe() #0 !dbg !182 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !180 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !180 -// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %_.var, ptr %a), !dbg !181 -// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %return, ptr %a), !dbg !183 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var), !dbg !180 -// CHECK:STDOUT: ret void, !dbg !184 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !186 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !186 +// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !187 +// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !189 +// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !186 +// CHECK:STDOUT: ret void, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.a5d0440dfa027ffe() #0 !dbg !186 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.25802053f9465fe8(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !191 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !190 -// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !191 -// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !190 -// CHECK:STDOUT: ret void, !dbg !194 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !196 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !196 +// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %_.var, ptr %a), !dbg !197 +// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %return, ptr %a), !dbg !199 +// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %_.var), !dbg !196 +// CHECK:STDOUT: ret void, !dbg !200 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.25802053f9465fe8(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !195 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f37d80e656707351(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !202 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !200 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !200 -// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %_.var, ptr %a), !dbg !201 -// CHECK:STDOUT: call void @"_COp.e554695bf635d9c1:Copy.Main"(ptr %return, ptr %a), !dbg !203 -// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %_.var), !dbg !200 -// CHECK:STDOUT: ret void, !dbg !204 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f37d80e656707351(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !206 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { i32, i32 }, { i32, i32 } }, align 4, !dbg !211 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !211 -// CHECK:STDOUT: call void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr %_.var, ptr %a), !dbg !212 -// CHECK:STDOUT: call void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr %return, ptr %a), !dbg !214 -// CHECK:STDOUT: call void @"_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core"(ptr %_.var), !dbg !211 -// CHECK:STDOUT: ret void, !dbg !215 +// CHECK:STDOUT: %_.var = alloca { { i32, i32 }, { i32, i32 } }, align 4, !dbg !207 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !207 +// CHECK:STDOUT: call void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr %_.var, ptr %a), !dbg !208 +// CHECK:STDOUT: call void @"_COp.ae1e3622d7875d32:Copy.Main"(ptr %return, ptr %a), !dbg !210 +// CHECK:STDOUT: call void @"_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core"(ptr %_.var), !dbg !207 +// CHECK:STDOUT: ret void, !dbg !211 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -341,120 +334,116 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) // CHECK:STDOUT: !51 = !DILocation(line: 29, column: 10, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 29, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 29, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !20) // CHECK:STDOUT: !55 = !DILocation(line: 29, column: 10, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 29, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !20) -// CHECK:STDOUT: !59 = !DILocation(line: 29, column: 10, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !18, line: 37, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !70) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !25) -// CHECK:STDOUT: !66 = !DILocation(line: 38, column: 20, scope: !61) -// CHECK:STDOUT: !67 = !DILocation(line: 38, column: 33, scope: !61) -// CHECK:STDOUT: !68 = !DILocation(line: 38, column: 14, scope: !61) -// CHECK:STDOUT: !69 = !DILocation(line: 38, column: 7, scope: !61) -// CHECK:STDOUT: !70 = !{!62} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !18, line: 43, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !25) -// CHECK:STDOUT: !77 = !DILocation(line: 44, column: 10, scope: !71) -// CHECK:STDOUT: !78 = !DILocation(line: 44, column: 3, scope: !71) -// CHECK:STDOUT: !79 = !{!72} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !18, line: 37, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !25) +// CHECK:STDOUT: !62 = !DILocation(line: 38, column: 20, scope: !57) +// CHECK:STDOUT: !63 = !DILocation(line: 38, column: 33, scope: !57) +// CHECK:STDOUT: !64 = !DILocation(line: 38, column: 14, scope: !57) +// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 7, scope: !57) +// CHECK:STDOUT: !66 = !{!58} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !18, line: 43, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !25) +// CHECK:STDOUT: !73 = !DILocation(line: 44, column: 10, scope: !67) +// CHECK:STDOUT: !74 = !DILocation(line: 44, column: 3, scope: !67) +// CHECK:STDOUT: !75 = !{!68} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !25) +// CHECK:STDOUT: !78 = !DILocation(line: 44, column: 10, scope: !76) +// CHECK:STDOUT: !79 = !{!77} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !25) // CHECK:STDOUT: !82 = !DILocation(line: 44, column: 10, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !87) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !87) // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !25) // CHECK:STDOUT: !86 = !DILocation(line: 44, column: 10, scope: !84) // CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !91) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !91) // CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !25) // CHECK:STDOUT: !90 = !DILocation(line: 44, column: 10, scope: !88) // CHECK:STDOUT: !91 = !{!89} -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !95) -// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !25) -// CHECK:STDOUT: !94 = !DILocation(line: 44, column: 10, scope: !92) -// CHECK:STDOUT: !95 = !{!93} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !18, line: 48, type: !31, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !100 = !DILocation(line: 49, column: 5, scope: !96) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F_empty_tuple", linkageName: "_CF_empty_tuple.Main", scope: null, file: !18, line: 53, type: !31, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !106 = !DILocation(line: 54, column: 10, scope: !101) -// CHECK:STDOUT: !107 = !DILocation(line: 54, column: 3, scope: !101) -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !18, line: 54, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !111) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !18, line: 48, type: !31, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !96 = !DILocation(line: 49, column: 5, scope: !92) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "F_empty_tuple", linkageName: "_CF_empty_tuple.Main", scope: null, file: !18, line: 53, type: !31, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !102 = !DILocation(line: 54, column: 10, scope: !97) +// CHECK:STDOUT: !103 = !DILocation(line: 54, column: 3, scope: !97) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !18, line: 54, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !107) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !25) +// CHECK:STDOUT: !106 = !DILocation(line: 54, column: 10, scope: !104) +// CHECK:STDOUT: !107 = !{!105} +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e554695bf635d9c1:Copy.Main", scope: null, file: !18, line: 58, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !115) // CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !25) -// CHECK:STDOUT: !110 = !DILocation(line: 54, column: 10, scope: !108) -// CHECK:STDOUT: !111 = !{!109} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e554695bf635d9c1:Copy.Main", scope: null, file: !18, line: 58, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !119) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !25) -// CHECK:STDOUT: !117 = !DILocation(line: 59, column: 12, scope: !112) -// CHECK:STDOUT: !118 = !DILocation(line: 59, column: 5, scope: !112) -// CHECK:STDOUT: !119 = !{!113} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !18, line: 63, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !128) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !25) -// CHECK:STDOUT: !126 = !DILocation(line: 64, column: 10, scope: !120) -// CHECK:STDOUT: !127 = !DILocation(line: 64, column: 3, scope: !120) -// CHECK:STDOUT: !128 = !{!121} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 64, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !132) +// CHECK:STDOUT: !113 = !DILocation(line: 59, column: 12, scope: !108) +// CHECK:STDOUT: !114 = !DILocation(line: 59, column: 5, scope: !108) +// CHECK:STDOUT: !115 = !{!109} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !18, line: 63, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !124) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !25) +// CHECK:STDOUT: !122 = !DILocation(line: 64, column: 10, scope: !116) +// CHECK:STDOUT: !123 = !DILocation(line: 64, column: 3, scope: !116) +// CHECK:STDOUT: !124 = !{!117} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 64, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !128) +// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !25) +// CHECK:STDOUT: !127 = !DILocation(line: 64, column: 10, scope: !125) +// CHECK:STDOUT: !128 = !{!126} +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 64, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !132) // CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !25) // CHECK:STDOUT: !131 = !DILocation(line: 64, column: 10, scope: !129) // CHECK:STDOUT: !132 = !{!130} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 64, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !136) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ae1e3622d7875d32:Copy.Main", scope: null, file: !18, line: 68, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !142) // CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !25) -// CHECK:STDOUT: !135 = !DILocation(line: 64, column: 10, scope: !133) -// CHECK:STDOUT: !136 = !{!134} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp.ae1e3622d7875d32:Copy.Main", scope: null, file: !18, line: 68, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !146) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !25) -// CHECK:STDOUT: !142 = !DILocation(line: 69, column: 13, scope: !137) -// CHECK:STDOUT: !143 = !DILocation(line: 69, column: 12, scope: !137) -// CHECK:STDOUT: !144 = !DILocation(line: 69, column: 33, scope: !137) -// CHECK:STDOUT: !145 = !DILocation(line: 69, column: 5, scope: !137) -// CHECK:STDOUT: !146 = !{!138} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !18, line: 73, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !155) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !25) -// CHECK:STDOUT: !153 = !DILocation(line: 74, column: 10, scope: !147) -// CHECK:STDOUT: !154 = !DILocation(line: 74, column: 3, scope: !147) -// CHECK:STDOUT: !155 = !{!148} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core", scope: null, file: !18, line: 74, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !159) +// CHECK:STDOUT: !138 = !DILocation(line: 69, column: 13, scope: !133) +// CHECK:STDOUT: !139 = !DILocation(line: 69, column: 12, scope: !133) +// CHECK:STDOUT: !140 = !DILocation(line: 69, column: 33, scope: !133) +// CHECK:STDOUT: !141 = !DILocation(line: 69, column: 5, scope: !133) +// CHECK:STDOUT: !142 = !{!134} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !18, line: 73, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !151) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !25) +// CHECK:STDOUT: !149 = !DILocation(line: 74, column: 10, scope: !143) +// CHECK:STDOUT: !150 = !DILocation(line: 74, column: 3, scope: !143) +// CHECK:STDOUT: !151 = !{!144} +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ae1e3622d7875d32:core.Destroy.Core", scope: null, file: !18, line: 74, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !155) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !25) +// CHECK:STDOUT: !154 = !DILocation(line: 74, column: 10, scope: !152) +// CHECK:STDOUT: !155 = !{!153} +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core", scope: null, file: !18, line: 74, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !159) // CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !25) // CHECK:STDOUT: !158 = !DILocation(line: 74, column: 10, scope: !156) // CHECK:STDOUT: !159 = !{!157} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ae1e3622d7875d32:core.Destroy.Core", scope: null, file: !18, line: 74, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !163) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !25) -// CHECK:STDOUT: !162 = !DILocation(line: 74, column: 10, scope: !160) -// CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.804fd121057d1d93", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !174) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !20) -// CHECK:STDOUT: !169 = !DILocation(line: 18, column: 3, scope: !164) -// CHECK:STDOUT: !170 = !DILocation(line: 18, column: 14, scope: !164) -// CHECK:STDOUT: !172 = !DILocation(line: 19, column: 10, scope: !164) -// CHECK:STDOUT: !173 = !DILocation(line: 19, column: 3, scope: !164) -// CHECK:STDOUT: !174 = !{!165} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9d368fc2e01d20c2", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !185) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !25) -// CHECK:STDOUT: !180 = !DILocation(line: 18, column: 3, scope: !175) -// CHECK:STDOUT: !181 = !DILocation(line: 18, column: 14, scope: !175) -// CHECK:STDOUT: !183 = !DILocation(line: 19, column: 10, scope: !175) -// CHECK:STDOUT: !184 = !DILocation(line: 19, column: 3, scope: !175) -// CHECK:STDOUT: !185 = !{!176} -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a5d0440dfa027ffe", scope: null, file: !18, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !190 = !DILocation(line: 18, column: 3, scope: !186) -// CHECK:STDOUT: !191 = !DILocation(line: 18, column: 14, scope: !186) -// CHECK:STDOUT: !193 = !DILocation(line: 19, column: 10, scope: !186) -// CHECK:STDOUT: !194 = !DILocation(line: 19, column: 3, scope: !186) -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.25802053f9465fe8", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !205) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !25) -// CHECK:STDOUT: !200 = !DILocation(line: 18, column: 3, scope: !195) -// CHECK:STDOUT: !201 = !DILocation(line: 18, column: 14, scope: !195) -// CHECK:STDOUT: !203 = !DILocation(line: 19, column: 10, scope: !195) -// CHECK:STDOUT: !204 = !DILocation(line: 19, column: 3, scope: !195) -// CHECK:STDOUT: !205 = !{!196} -// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f37d80e656707351", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !216) -// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !25) -// CHECK:STDOUT: !211 = !DILocation(line: 18, column: 3, scope: !206) -// CHECK:STDOUT: !212 = !DILocation(line: 18, column: 14, scope: !206) -// CHECK:STDOUT: !214 = !DILocation(line: 19, column: 10, scope: !206) -// CHECK:STDOUT: !215 = !DILocation(line: 19, column: 3, scope: !206) -// CHECK:STDOUT: !216 = !{!207} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.804fd121057d1d93", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !170) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !20) +// CHECK:STDOUT: !165 = !DILocation(line: 18, column: 3, scope: !160) +// CHECK:STDOUT: !166 = !DILocation(line: 18, column: 14, scope: !160) +// CHECK:STDOUT: !168 = !DILocation(line: 19, column: 10, scope: !160) +// CHECK:STDOUT: !169 = !DILocation(line: 19, column: 3, scope: !160) +// CHECK:STDOUT: !170 = !{!161} +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9d368fc2e01d20c2", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !181) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !25) +// CHECK:STDOUT: !176 = !DILocation(line: 18, column: 3, scope: !171) +// CHECK:STDOUT: !177 = !DILocation(line: 18, column: 14, scope: !171) +// CHECK:STDOUT: !179 = !DILocation(line: 19, column: 10, scope: !171) +// CHECK:STDOUT: !180 = !DILocation(line: 19, column: 3, scope: !171) +// CHECK:STDOUT: !181 = !{!172} +// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a5d0440dfa027ffe", scope: null, file: !18, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !186 = !DILocation(line: 18, column: 3, scope: !182) +// CHECK:STDOUT: !187 = !DILocation(line: 18, column: 14, scope: !182) +// CHECK:STDOUT: !189 = !DILocation(line: 19, column: 10, scope: !182) +// CHECK:STDOUT: !190 = !DILocation(line: 19, column: 3, scope: !182) +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.25802053f9465fe8", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !201) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !25) +// CHECK:STDOUT: !196 = !DILocation(line: 18, column: 3, scope: !191) +// CHECK:STDOUT: !197 = !DILocation(line: 18, column: 14, scope: !191) +// CHECK:STDOUT: !199 = !DILocation(line: 19, column: 10, scope: !191) +// CHECK:STDOUT: !200 = !DILocation(line: 19, column: 3, scope: !191) +// CHECK:STDOUT: !201 = !{!192} +// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f37d80e656707351", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !212) +// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !25) +// CHECK:STDOUT: !207 = !DILocation(line: 18, column: 3, scope: !202) +// CHECK:STDOUT: !208 = !DILocation(line: 18, column: 14, scope: !202) +// CHECK:STDOUT: !210 = !DILocation(line: 19, column: 10, scope: !202) +// CHECK:STDOUT: !211 = !DILocation(line: 19, column: 3, scope: !202) +// CHECK:STDOUT: !212 = !{!203} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/impl.carbon b/toolchain/lower/testdata/impl/impl.carbon index d201c0f076f9..da76ab2f7ab4 100644 --- a/toolchain/lower/testdata/impl/impl.carbon +++ b/toolchain/lower/testdata/impl/impl.carbon @@ -168,31 +168,17 @@ impl C(B) as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !87 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !91 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !93 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -241,52 +227,44 @@ impl C(B) as I { // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !21) // CHECK:STDOUT: !77 = !DILocation(line: 22, column: 3, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !40, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !40, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !21) // CHECK:STDOUT: !81 = !DILocation(line: 22, column: 3, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !40, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !40, line: 21, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !21) -// CHECK:STDOUT: !85 = !DILocation(line: 22, column: 3, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 21, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !40, line: 21, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !21) -// CHECK:STDOUT: !89 = !DILocation(line: 21, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !40, line: 21, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !21) -// CHECK:STDOUT: !93 = !DILocation(line: 21, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_class_impls.carbon' // CHECK:STDOUT: source_filename = "generic_class_impls.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.bd4fb75a414fe858.Main:I.Main"() #0 !dbg !99 { +// CHECK:STDOUT: define void @"_CF.C.bd4fb75a414fe858.Main:I.Main"() #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.a6a60dfee2d7d273.Main:I.Main"() #0 !dbg !101 { +// CHECK:STDOUT: define void @"_CF.C.a6a60dfee2d7d273.Main:I.Main"() #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!96} +// CHECK:STDOUT: !llvm.dbg.cu = !{!88} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !95 = !DIFile(filename: "generic_class_impls.carbon", directory: "") -// CHECK:STDOUT: !96 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !95, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !97 = !{null} -// CHECK:STDOUT: !98 = !DISubroutineType(types: !97) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.bd4fb75a414fe858.Main:I.Main", scope: null, file: !95, line: 14, type: !98, spFlags: DISPFlagDefinition, unit: !96) -// CHECK:STDOUT: !100 = !DILocation(line: 14, column: 3, scope: !99) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.a6a60dfee2d7d273.Main:I.Main", scope: null, file: !95, line: 18, type: !98, spFlags: DISPFlagDefinition, unit: !96) -// CHECK:STDOUT: !102 = !DILocation(line: 18, column: 3, scope: !101) +// CHECK:STDOUT: !87 = !DIFile(filename: "generic_class_impls.carbon", directory: "") +// CHECK:STDOUT: !88 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !87, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !89 = !{null} +// CHECK:STDOUT: !90 = !DISubroutineType(types: !89) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.bd4fb75a414fe858.Main:I.Main", scope: null, file: !87, line: 14, type: !90, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !92 = !DILocation(line: 14, column: 3, scope: !91) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.a6a60dfee2d7d273.Main:I.Main", scope: null, file: !87, line: 18, type: !90, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !94 = !DILocation(line: 18, column: 3, scope: !93) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/import_facet.carbon b/toolchain/lower/testdata/impl/import_facet.carbon index acf292148fe6..d5735abde9a5 100644 --- a/toolchain/lower/testdata/impl/import_facet.carbon +++ b/toolchain/lower/testdata/impl/import_facet.carbon @@ -118,35 +118,28 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.14de9dd8f7d35649:core.Destroy.Core"(ptr %self) #0 !dbg !33 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.14de9dd8f7d35649:core.Destroy.Core"(ptr %self) #0 !dbg !33 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.14de9dd8f7d35649:core.Destroy.Core"(ptr %self) #0 !dbg !37 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.14de9dd8f7d35649:core.Destroy.Core"(ptr %self), !dbg !39 -// CHECK:STDOUT: ret void, !dbg !39 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba"(ptr sret({}) %return, ptr %self) #0 !dbg !41 { -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.207.anon, i64 0, i1 false), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: define linkonce_odr void @"_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba"(ptr sret({}) %return, ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.207.anon, i64 0, i1 false), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGetC.C.Main.aac7339a58c49d52(ptr %self) #0 !dbg !48 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !53 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !53 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %1), !dbg !53 -// CHECK:STDOUT: ret ptr %2, !dbg !56 +// CHECK:STDOUT: define linkonce_odr ptr @_CGetC.C.Main.aac7339a58c49d52(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !49 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !49 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !51 +// CHECK:STDOUT: call void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %1), !dbg !49 +// CHECK:STDOUT: ret ptr %2, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -182,22 +175,18 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !12) // CHECK:STDOUT: !31 = !DILocation(line: 5, column: 10, scope: !29) // CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.14de9dd8f7d35649:core.Destroy.Core", scope: null, file: !10, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.14de9dd8f7d35649:core.Destroy.Core", scope: null, file: !10, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !36) // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !12) // CHECK:STDOUT: !35 = !DILocation(line: 5, column: 10, scope: !33) // CHECK:STDOUT: !36 = !{!34} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.14de9dd8f7d35649:core.Destroy.Core", scope: null, file: !10, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba", scope: null, file: !8, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !43) // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !12) -// CHECK:STDOUT: !39 = !DILocation(line: 5, column: 10, scope: !37) -// CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.84588f41d61dafba", scope: null, file: !8, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !47) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !12) -// CHECK:STDOUT: !46 = !DILocation(line: 7, column: 7, scope: !41) -// CHECK:STDOUT: !47 = !{!42} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.aac7339a58c49d52", scope: null, file: !4, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !57) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !12) -// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 5, scope: !48) -// CHECK:STDOUT: !55 = !DILocation(line: 6, column: 12, scope: !48) -// CHECK:STDOUT: !56 = !DILocation(line: 6, column: 5, scope: !48) -// CHECK:STDOUT: !57 = !{!49} +// CHECK:STDOUT: !42 = !DILocation(line: 7, column: 7, scope: !37) +// CHECK:STDOUT: !43 = !{!38} +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.aac7339a58c49d52", scope: null, file: !4, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !53) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !12) +// CHECK:STDOUT: !49 = !DILocation(line: 5, column: 5, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 6, column: 12, scope: !44) +// CHECK:STDOUT: !52 = !DILocation(line: 6, column: 5, scope: !44) +// CHECK:STDOUT: !53 = !{!45} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/import_thunk.carbon b/toolchain/lower/testdata/impl/import_thunk.carbon index 982183afc879..42375da0f37c 100644 --- a/toolchain/lower/testdata/impl/import_thunk.carbon +++ b/toolchain/lower/testdata/impl/import_thunk.carbon @@ -122,44 +122,37 @@ fn Test(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !70 // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !78 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !82 // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !84 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !86 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: @@ -213,50 +206,46 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !20) // CHECK:STDOUT: !62 = !DILocation(line: 20, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !20) // CHECK:STDOUT: !66 = !DILocation(line: 20, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !20) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !21) // CHECK:STDOUT: !70 = !DILocation(line: 20, column: 3, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !21) // CHECK:STDOUT: !74 = !DILocation(line: 20, column: 3, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !21) // CHECK:STDOUT: !78 = !DILocation(line: 20, column: 3, scope: !76) // CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !21) // CHECK:STDOUT: !82 = !DILocation(line: 20, column: 3, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !87) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !21) -// CHECK:STDOUT: !86 = !DILocation(line: 20, column: 3, scope: !84) -// CHECK:STDOUT: !87 = !{!85} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_thunk.carbon' // CHECK:STDOUT: source_filename = "call_thunk.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !90 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !96 -// CHECK:STDOUT: %.loc7_20.2.temp = alloca { i32 }, align 4, !dbg !96 -// CHECK:STDOUT: %.loc7_19.1.temp = alloca { i32 }, align 4, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !96 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.2.temp), !dbg !96 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.1.temp), !dbg !95 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc7_19.1.temp, ptr %a), !dbg !95 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc7_20.2.temp, ptr %.loc7_19.1.temp), !dbg !96 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc7_20.2.temp), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_20.2.temp), !dbg !96 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_19.1.temp), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !92 +// CHECK:STDOUT: %.loc7_20.2.temp = alloca { i32 }, align 4, !dbg !92 +// CHECK:STDOUT: %.loc7_19.1.temp = alloca { i32 }, align 4, !dbg !91 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.2.temp), !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.1.temp), !dbg !91 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc7_19.1.temp, ptr %a), !dbg !91 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc7_20.2.temp, ptr %.loc7_19.1.temp), !dbg !92 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc7_20.2.temp), !dbg !93 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_20.2.temp), !dbg !92 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_19.1.temp), !dbg !91 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF:thunk:I.f5faeaa774ca256e.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }), ptr) @@ -268,50 +257,43 @@ fn Test(a: A) -> C { // CHECK:STDOUT: declare void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !99 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !109 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !109 // CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !111 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !111 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !113 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !115 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !117 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !117 // CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !119 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !121 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !125 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -322,7 +304,7 @@ 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.dbg.cu = !{!89} +// CHECK:STDOUT: !llvm.dbg.cu = !{!85} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -335,70 +317,66 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !88 = !DIFile(filename: "call_thunk.carbon", directory: "") -// CHECK:STDOUT: !89 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !88, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !88, line: 6, type: !23, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !98) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !21) -// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 19, scope: !90) -// CHECK:STDOUT: !96 = !DILocation(line: 7, column: 10, scope: !90) -// CHECK:STDOUT: !97 = !DILocation(line: 7, column: 3, scope: !90) -// CHECK:STDOUT: !98 = !{!91} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !88, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !102) +// CHECK:STDOUT: !84 = !DIFile(filename: "call_thunk.carbon", directory: "") +// CHECK:STDOUT: !85 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !84, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !84, line: 6, type: !23, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !94) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !21) +// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 19, scope: !86) +// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 10, scope: !86) +// CHECK:STDOUT: !93 = !DILocation(line: 7, column: 3, scope: !86) +// CHECK:STDOUT: !94 = !{!87} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !84, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !98) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !20) +// CHECK:STDOUT: !97 = !DILocation(line: 7, column: 10, scope: !95) +// CHECK:STDOUT: !98 = !{!96} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !84, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !102) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !20) // CHECK:STDOUT: !101 = !DILocation(line: 7, column: 10, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !20) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !84, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !106) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !21) // CHECK:STDOUT: !105 = !DILocation(line: 7, column: 10, scope: !103) // CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !20) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !84, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !110) +// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !21) // CHECK:STDOUT: !109 = !DILocation(line: 7, column: 10, scope: !107) // CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !88, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !114) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !84, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !114) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !21) // CHECK:STDOUT: !113 = !DILocation(line: 7, column: 10, scope: !111) // CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !88, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !118) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !84, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !118) // CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !21) // CHECK:STDOUT: !117 = !DILocation(line: 7, column: 10, scope: !115) // CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !88, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !122) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !21) -// CHECK:STDOUT: !121 = !DILocation(line: 7, column: 10, scope: !119) -// CHECK:STDOUT: !122 = !{!120} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !88, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !126) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !21) -// CHECK:STDOUT: !125 = !DILocation(line: 7, column: 10, scope: !123) -// CHECK:STDOUT: !126 = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunk_for_imported_interface.carbon' // CHECK:STDOUT: source_filename = "thunk_for_imported_interface.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !129 { +// CHECK:STDOUT: define void @"_CF.X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !134 -// CHECK:STDOUT: %.loc9_35.2 = load i32, ptr %.loc9_35.1.b, align 4, !dbg !134 -// CHECK:STDOUT: %.loc9_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !135 -// CHECK:STDOUT: store i32 %.loc9_35.2, ptr %.loc9_37.2.b, align 4, !dbg !135 -// CHECK:STDOUT: ret void, !dbg !136 +// CHECK:STDOUT: %.loc9_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !126 +// CHECK:STDOUT: %.loc9_35.2 = load i32, ptr %.loc9_35.1.b, align 4, !dbg !126 +// CHECK:STDOUT: %.loc9_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !127 +// CHECK:STDOUT: store i32 %.loc9_35.2, ptr %.loc9_37.2.b, align 4, !dbg !127 +// CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !138 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !130 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_19.1.temp = alloca { i32 }, align 4, !dbg !141 -// CHECK:STDOUT: %.4.temp = alloca { i32 }, align 4, !dbg !140 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.1.temp), !dbg !141 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !140 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.4.temp, ptr %a), !dbg !140 -// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc9_19.1.temp, ptr %.4.temp), !dbg !141 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc9_19.1.temp), !dbg !141 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc9_19.1.temp), !dbg !141 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.4.temp), !dbg !140 -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: %.loc9_19.1.temp = alloca { i32 }, align 4, !dbg !133 +// CHECK:STDOUT: %.4.temp = alloca { i32 }, align 4, !dbg !132 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.1.temp), !dbg !133 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !132 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.4.temp, ptr %a), !dbg !132 +// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc9_19.1.temp, ptr %.4.temp), !dbg !133 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc9_19.1.temp), !dbg !133 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc9_19.1.temp), !dbg !133 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.4.temp), !dbg !132 +// CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }), ptr) @@ -406,50 +384,43 @@ fn Test(a: A) -> C { // CHECK:STDOUT: declare void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !143 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !135 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !143 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !145 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !147 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !149 // CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !153 // CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !155 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !155 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !157 // CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !159 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !161 -// CHECK:STDOUT: ret void, !dbg !161 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !163 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !165 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !167 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !169 -// CHECK:STDOUT: ret void, !dbg !169 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: @@ -461,7 +432,7 @@ 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.dbg.cu = !{!128} +// CHECK:STDOUT: !llvm.dbg.cu = !{!120} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -474,67 +445,63 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !127 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !128 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !127, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !127, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !137) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !21) -// CHECK:STDOUT: !134 = !DILocation(line: 9, column: 34, scope: !129) -// CHECK:STDOUT: !135 = !DILocation(line: 9, column: 28, scope: !129) -// CHECK:STDOUT: !136 = !DILocation(line: 9, column: 21, scope: !129) -// CHECK:STDOUT: !137 = !{!130} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main", scope: null, file: !127, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !142) -// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !21) -// CHECK:STDOUT: !140 = !DILocation(line: 0, scope: !138) -// CHECK:STDOUT: !141 = !DILocation(line: 9, column: 3, scope: !138) -// CHECK:STDOUT: !142 = !{!139} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !127, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !146) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !20) +// CHECK:STDOUT: !119 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") +// CHECK:STDOUT: !120 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !119, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !119, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !129) +// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !21) +// CHECK:STDOUT: !126 = !DILocation(line: 9, column: 34, scope: !121) +// CHECK:STDOUT: !127 = !DILocation(line: 9, column: 28, scope: !121) +// CHECK:STDOUT: !128 = !DILocation(line: 9, column: 21, scope: !121) +// CHECK:STDOUT: !129 = !{!122} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main", scope: null, file: !119, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !134) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !21) +// CHECK:STDOUT: !132 = !DILocation(line: 0, scope: !130) +// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 3, scope: !130) +// CHECK:STDOUT: !134 = !{!131} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !119, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !138) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !20) +// CHECK:STDOUT: !137 = !DILocation(line: 9, column: 3, scope: !135) +// CHECK:STDOUT: !138 = !{!136} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !119, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !142) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !20) +// CHECK:STDOUT: !141 = !DILocation(line: 9, column: 3, scope: !139) +// CHECK:STDOUT: !142 = !{!140} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !119, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !146) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !21) // CHECK:STDOUT: !145 = !DILocation(line: 9, column: 3, scope: !143) // CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !127, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !150) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !20) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !119, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !150) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !21) // CHECK:STDOUT: !149 = !DILocation(line: 9, column: 3, scope: !147) // CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !127, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !20) +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !119, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !154) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !21) // CHECK:STDOUT: !153 = !DILocation(line: 9, column: 3, scope: !151) // CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !127, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !158) +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !119, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !158) // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !21) // CHECK:STDOUT: !157 = !DILocation(line: 9, column: 3, scope: !155) // CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !127, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !162) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !21) -// CHECK:STDOUT: !161 = !DILocation(line: 9, column: 3, scope: !159) -// CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !127, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !166) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !21) -// CHECK:STDOUT: !165 = !DILocation(line: 9, column: 3, scope: !163) -// CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !127, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !170) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !21) -// CHECK:STDOUT: !169 = !DILocation(line: 9, column: 3, scope: !167) -// CHECK:STDOUT: !170 = !{!168} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_thunk_for_imported_interface.carbon' // CHECK:STDOUT: source_filename = "call_thunk_for_imported_interface.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !173 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_19.1.temp = alloca { i32 }, align 4, !dbg !179 -// CHECK:STDOUT: %.loc8_19.2.temp = alloca { i32 }, align 4, !dbg !179 -// CHECK:STDOUT: %.loc8_18.1.temp = alloca { i32 }, align 4, !dbg !178 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.1.temp), !dbg !179 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.2.temp), !dbg !179 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_18.1.temp), !dbg !178 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc8_18.1.temp, ptr %a), !dbg !178 -// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc8_19.2.temp, ptr %.loc8_18.1.temp), !dbg !179 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc8_19.2.temp), !dbg !180 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_19.2.temp), !dbg !179 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_18.1.temp), !dbg !178 -// CHECK:STDOUT: ret void, !dbg !180 +// CHECK:STDOUT: %.loc8_19.1.temp = alloca { i32 }, align 4, !dbg !167 +// CHECK:STDOUT: %.loc8_19.2.temp = alloca { i32 }, align 4, !dbg !167 +// CHECK:STDOUT: %.loc8_18.1.temp = alloca { i32 }, align 4, !dbg !166 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.1.temp), !dbg !167 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.2.temp), !dbg !167 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_18.1.temp), !dbg !166 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc8_18.1.temp, ptr %a), !dbg !166 +// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc8_19.2.temp, ptr %.loc8_18.1.temp), !dbg !167 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc8_19.2.temp), !dbg !168 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_19.2.temp), !dbg !167 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_18.1.temp), !dbg !166 +// CHECK:STDOUT: ret void, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF:thunk:I.4980a17f6b368c72.Main:X.Main:I.Main"(ptr sret({ i32 }), ptr) @@ -546,50 +513,43 @@ fn Test(a: A) -> C { // CHECK:STDOUT: declare void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !182 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !170 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !172 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !174 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !178 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !180 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !182 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !184 // CHECK:STDOUT: ret void, !dbg !184 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !186 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !186 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !188 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !190 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !190 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !192 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !192 // CHECK:STDOUT: ret void, !dbg !192 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !194 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !196 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !198 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !200 -// CHECK:STDOUT: ret void, !dbg !200 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !202 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !204 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !206 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !208 -// CHECK:STDOUT: ret void, !dbg !208 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -600,7 +560,7 @@ 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.dbg.cu = !{!172} +// CHECK:STDOUT: !llvm.dbg.cu = !{!160} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -613,40 +573,36 @@ fn Test(a: A) -> C { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !171 = !DIFile(filename: "call_thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !172 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !171, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !171, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !181) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !21) -// CHECK:STDOUT: !178 = !DILocation(line: 8, column: 18, scope: !173) -// CHECK:STDOUT: !179 = !DILocation(line: 8, column: 10, scope: !173) -// CHECK:STDOUT: !180 = !DILocation(line: 8, column: 3, scope: !173) -// CHECK:STDOUT: !181 = !{!174} -// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !171, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !185) -// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !20) +// CHECK:STDOUT: !159 = !DIFile(filename: "call_thunk_for_imported_interface.carbon", directory: "") +// CHECK:STDOUT: !160 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !159, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !159, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !169) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !21) +// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 18, scope: !161) +// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 10, scope: !161) +// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 3, scope: !161) +// CHECK:STDOUT: !169 = !{!162} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !159, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !173) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !20) +// CHECK:STDOUT: !172 = !DILocation(line: 8, column: 10, scope: !170) +// CHECK:STDOUT: !173 = !{!171} +// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !159, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !177) +// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !20) +// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 10, scope: !174) +// CHECK:STDOUT: !177 = !{!175} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !159, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !181) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !21) +// CHECK:STDOUT: !180 = !DILocation(line: 8, column: 10, scope: !178) +// CHECK:STDOUT: !181 = !{!179} +// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !159, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !185) +// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !21) // CHECK:STDOUT: !184 = !DILocation(line: 8, column: 10, scope: !182) // CHECK:STDOUT: !185 = !{!183} -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !171, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !189) -// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !20) +// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !159, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !189) +// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !21) // CHECK:STDOUT: !188 = !DILocation(line: 8, column: 10, scope: !186) // CHECK:STDOUT: !189 = !{!187} -// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !171, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !193) -// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !20) +// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !159, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !160, retainedNodes: !193) +// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !21) // CHECK:STDOUT: !192 = !DILocation(line: 8, column: 10, scope: !190) // CHECK:STDOUT: !193 = !{!191} -// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !171, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !197) -// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !21) -// CHECK:STDOUT: !196 = !DILocation(line: 8, column: 10, scope: !194) -// CHECK:STDOUT: !197 = !{!195} -// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !171, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !201) -// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !21) -// CHECK:STDOUT: !200 = !DILocation(line: 8, column: 10, scope: !198) -// CHECK:STDOUT: !201 = !{!199} -// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !171, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !205) -// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !21) -// CHECK:STDOUT: !204 = !DILocation(line: 8, column: 10, scope: !202) -// CHECK:STDOUT: !205 = !{!203} -// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !171, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !209) -// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !21) -// CHECK:STDOUT: !208 = !DILocation(line: 8, column: 10, scope: !206) -// CHECK:STDOUT: !209 = !{!207} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/thunk.carbon b/toolchain/lower/testdata/impl/thunk.carbon index aa94e7ccbce6..585d3271bf77 100644 --- a/toolchain/lower/testdata/impl/thunk.carbon +++ b/toolchain/lower/testdata/impl/thunk.carbon @@ -126,59 +126,52 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !70 // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core"(ptr %self), !dbg !78 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !82 // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !84 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !86 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !88 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc24_20.1.temp = alloca { i32 }, align 4, !dbg !94 -// CHECK:STDOUT: %.loc24_20.2.temp = alloca { i32 }, align 4, !dbg !94 -// CHECK:STDOUT: %.loc24_19.1.temp = alloca { i32 }, align 4, !dbg !93 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.1.temp), !dbg !94 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.2.temp), !dbg !94 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_19.1.temp), !dbg !93 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc24_19.1.temp, ptr %a), !dbg !93 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc24_20.2.temp, ptr %.loc24_19.1.temp), !dbg !94 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc24_20.2.temp), !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_20.2.temp), !dbg !94 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_19.1.temp), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: %.loc24_20.1.temp = alloca { i32 }, align 4, !dbg !90 +// CHECK:STDOUT: %.loc24_20.2.temp = alloca { i32 }, align 4, !dbg !90 +// CHECK:STDOUT: %.loc24_19.1.temp = alloca { i32 }, align 4, !dbg !89 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.1.temp), !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.2.temp), !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_19.1.temp), !dbg !89 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc24_19.1.temp, ptr %a), !dbg !89 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc24_20.2.temp, ptr %.loc24_19.1.temp), !dbg !90 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc24_20.2.temp), !dbg !91 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_20.2.temp), !dbg !90 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_19.1.temp), !dbg !89 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -234,36 +227,32 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !20) // CHECK:STDOUT: !62 = !DILocation(line: 20, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !20) // CHECK:STDOUT: !66 = !DILocation(line: 20, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !20) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !21) // CHECK:STDOUT: !70 = !DILocation(line: 20, column: 3, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !21) // CHECK:STDOUT: !74 = !DILocation(line: 20, column: 3, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0bfe8bb35a2876b2:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !79) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !21) // CHECK:STDOUT: !78 = !DILocation(line: 20, column: 3, scope: !76) // CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !21) // CHECK:STDOUT: !82 = !DILocation(line: 20, column: 3, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !87) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !18, line: 23, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !92) // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !21) -// CHECK:STDOUT: !86 = !DILocation(line: 20, column: 3, scope: !84) -// CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !18, line: 23, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !96) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !21) -// CHECK:STDOUT: !93 = !DILocation(line: 24, column: 19, scope: !88) -// CHECK:STDOUT: !94 = !DILocation(line: 24, column: 10, scope: !88) -// CHECK:STDOUT: !95 = !DILocation(line: 24, column: 3, scope: !88) -// CHECK:STDOUT: !96 = !{!89} +// CHECK:STDOUT: !89 = !DILocation(line: 24, column: 19, scope: !84) +// CHECK:STDOUT: !90 = !DILocation(line: 24, column: 10, scope: !84) +// CHECK:STDOUT: !91 = !DILocation(line: 24, column: 3, scope: !84) +// CHECK:STDOUT: !92 = !{!85} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_thunk.carbon' @@ -273,68 +262,54 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: @B.val.loc18_43 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc7_45, i64 0, i1 false), !dbg !102 +// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc7_45, i64 0, i1 false), !dbg !106 // CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !108 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !108 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !112 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !112 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !116 { +// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !118 -// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: %.loc22_23.1.temp = alloca {}, align 1, !dbg !123 +// CHECK:STDOUT: %.loc22_23.3.temp = alloca {}, align 1, !dbg !123 +// CHECK:STDOUT: %.loc22_22.1.temp = alloca {}, align 1, !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.1.temp), !dbg !123 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.3.temp), !dbg !123 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_22.1.temp), !dbg !124 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc22_22.1.temp, ptr %b), !dbg !124 +// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc22_23.3.temp, ptr %c, ptr %.loc22_22.1.temp), !dbg !123 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc22_23.3.temp), !dbg !125 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc22_23.3.temp), !dbg !123 +// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.loc22_22.1.temp), !dbg !124 +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !120 { +// CHECK:STDOUT: define void @_CCallCallGeneric.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !127 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !122 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !124 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !126 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !128 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_23.1.temp = alloca {}, align 1, !dbg !135 -// CHECK:STDOUT: %.loc22_23.3.temp = alloca {}, align 1, !dbg !135 -// CHECK:STDOUT: %.loc22_22.1.temp = alloca {}, align 1, !dbg !136 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.1.temp), !dbg !135 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.3.temp), !dbg !135 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_22.1.temp), !dbg !136 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc22_22.1.temp, ptr %b), !dbg !136 -// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc22_23.3.temp, ptr %c, ptr %.loc22_22.1.temp), !dbg !135 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc22_23.3.temp), !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc22_23.3.temp), !dbg !135 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.loc22_22.1.temp), !dbg !136 +// CHECK:STDOUT: call void @_CCallGeneric.Main.8a681e94b982e379(ptr %return, ptr %c, ptr %b), !dbg !136 // CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallCallGeneric.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !139 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallGeneric.Main.8a681e94b982e379(ptr %return, ptr %c, ptr %b), !dbg !148 -// CHECK:STDOUT: ret void, !dbg !149 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -342,32 +317,32 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %_) #0 !dbg !151 { +// CHECK:STDOUT: define linkonce_odr void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %_) #0 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc18_43, i64 0, i1 false), !dbg !158 -// CHECK:STDOUT: ret void, !dbg !158 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc18_43, i64 0, i1 false), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallGeneric.Main.8a681e94b982e379(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !160 { +// CHECK:STDOUT: define linkonce_odr void @_CCallGeneric.Main.8a681e94b982e379(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !148 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %return, ptr %c, ptr %b), !dbg !167 -// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: call void @"_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %return, ptr %c, ptr %b), !dbg !155 +// CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %x) #2 !dbg !171 { +// CHECK:STDOUT: define linkonce_odr void @"_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %x) #2 !dbg !159 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_32.2.temp = alloca {}, align 1, !dbg !175 -// CHECK:STDOUT: %.6.temp = alloca {}, align 1, !dbg !174 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.2.temp), !dbg !175 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.6.temp), !dbg !174 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.6.temp, ptr %x), !dbg !174 -// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc18_32.2.temp, ptr %self, ptr %.6.temp), !dbg !175 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc18_32.2.temp), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc18_32.2.temp), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.6.temp), !dbg !174 -// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: %.loc18_32.2.temp = alloca {}, align 1, !dbg !163 +// CHECK:STDOUT: %.6.temp = alloca {}, align 1, !dbg !162 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.2.temp), !dbg !163 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.6.temp), !dbg !162 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.6.temp, ptr %x), !dbg !162 +// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc18_32.2.temp, ptr %self, ptr %.6.temp), !dbg !163 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc18_32.2.temp), !dbg !163 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc18_32.2.temp), !dbg !163 +// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.6.temp), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -377,7 +352,7 @@ 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.dbg.cu = !{!98} +// CHECK:STDOUT: !llvm.dbg.cu = !{!94} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -387,62 +362,54 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !97 = !DIFile(filename: "generic_thunk.carbon", directory: "") -// CHECK:STDOUT: !98 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !97, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !99 = !{!21, !21, !21} -// CHECK:STDOUT: !100 = !DISubroutineType(types: !99) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !97, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !107) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !21) -// CHECK:STDOUT: !106 = !DILocation(line: 7, column: 36, scope: !101) -// CHECK:STDOUT: !107 = !{!102} -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !97, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !111) +// CHECK:STDOUT: !93 = !DIFile(filename: "generic_thunk.carbon", directory: "") +// CHECK:STDOUT: !94 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !93, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !95 = !{!21, !21, !21} +// CHECK:STDOUT: !96 = !DISubroutineType(types: !95) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !93, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !103) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !21) +// CHECK:STDOUT: !102 = !DILocation(line: 7, column: 36, scope: !97) +// CHECK:STDOUT: !103 = !{!98} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !93, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !107) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !21) +// CHECK:STDOUT: !106 = !DILocation(line: 18, column: 3, scope: !104) +// CHECK:STDOUT: !107 = !{!105} +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !93, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !111) // CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !21) // CHECK:STDOUT: !110 = !DILocation(line: 18, column: 3, scope: !108) // CHECK:STDOUT: !111 = !{!109} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !97, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !115) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !93, type: !27, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !115) // CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !21) -// CHECK:STDOUT: !114 = !DILocation(line: 18, column: 3, scope: !112) +// CHECK:STDOUT: !114 = !DILocation(line: 0, scope: !112) // CHECK:STDOUT: !115 = !{!113} -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !97, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !119) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !93, line: 21, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !126) // CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !21) -// CHECK:STDOUT: !118 = !DILocation(line: 18, column: 3, scope: !116) -// CHECK:STDOUT: !119 = !{!117} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !97, type: !27, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !123) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !21) -// CHECK:STDOUT: !122 = !DILocation(line: 0, scope: !120) -// CHECK:STDOUT: !123 = !{!121} -// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !97, type: !27, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !127) -// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !21) -// CHECK:STDOUT: !126 = !DILocation(line: 0, scope: !124) -// CHECK:STDOUT: !127 = !{!125} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !97, line: 21, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !138) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !21) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 2, scope: !128, type: !21) -// CHECK:STDOUT: !135 = !DILocation(line: 22, column: 10, scope: !128) -// CHECK:STDOUT: !136 = !DILocation(line: 22, column: 22, scope: !128) -// CHECK:STDOUT: !137 = !DILocation(line: 22, column: 3, scope: !128) -// CHECK:STDOUT: !138 = !{!129, !130} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !97, line: 29, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !150) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !116, type: !21) +// CHECK:STDOUT: !123 = !DILocation(line: 22, column: 10, scope: !116) +// CHECK:STDOUT: !124 = !DILocation(line: 22, column: 22, scope: !116) +// CHECK:STDOUT: !125 = !DILocation(line: 22, column: 3, scope: !116) +// CHECK:STDOUT: !126 = !{!117, !118} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !93, line: 29, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !138) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !21) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 2, scope: !127, type: !21) +// CHECK:STDOUT: !136 = !DILocation(line: 30, column: 10, scope: !127) +// CHECK:STDOUT: !137 = !DILocation(line: 30, column: 3, scope: !127) +// CHECK:STDOUT: !138 = !{!128, !129} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !93, line: 18, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !147) // CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !21) // CHECK:STDOUT: !141 = !DILocalVariable(arg: 2, scope: !139, type: !21) -// CHECK:STDOUT: !148 = !DILocation(line: 30, column: 10, scope: !139) -// CHECK:STDOUT: !149 = !DILocation(line: 30, column: 3, scope: !139) -// CHECK:STDOUT: !150 = !{!140, !141} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !97, line: 18, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !159) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !21) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 2, scope: !151, type: !21) -// CHECK:STDOUT: !158 = !DILocation(line: 18, column: 34, scope: !151) -// CHECK:STDOUT: !159 = !{!152, !153} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.8a681e94b982e379", scope: null, file: !97, line: 25, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !170) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !21) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 2, scope: !160, type: !21) -// CHECK:STDOUT: !167 = !DILocation(line: 26, column: 10, scope: !160) -// CHECK:STDOUT: !169 = !DILocation(line: 26, column: 3, scope: !160) -// CHECK:STDOUT: !170 = !{!161, !162} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !97, line: 18, type: !100, spFlags: DISPFlagDefinition, unit: !98, retainedNodes: !176) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !21) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 2, scope: !171, type: !21) -// CHECK:STDOUT: !174 = !DILocation(line: 0, scope: !171) -// CHECK:STDOUT: !175 = !DILocation(line: 18, column: 3, scope: !171) -// CHECK:STDOUT: !176 = !{!172, !173} +// CHECK:STDOUT: !146 = !DILocation(line: 18, column: 34, scope: !139) +// CHECK:STDOUT: !147 = !{!140, !141} +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.8a681e94b982e379", scope: null, file: !93, line: 25, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !158) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !21) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 2, scope: !148, type: !21) +// CHECK:STDOUT: !155 = !DILocation(line: 26, column: 10, scope: !148) +// CHECK:STDOUT: !157 = !DILocation(line: 26, column: 3, scope: !148) +// CHECK:STDOUT: !158 = !{!149, !150} +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.eca2102529696f40.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !93, line: 18, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !164) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !21) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 2, scope: !159, type: !21) +// CHECK:STDOUT: !162 = !DILocation(line: 0, scope: !159) +// CHECK:STDOUT: !163 = !DILocation(line: 18, column: 3, scope: !159) +// CHECK:STDOUT: !164 = !{!160, !161} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index bf66209aab6a..b90b1f2f46bb 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -94,44 +94,37 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !64 // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core"(ptr %self), !dbg !72 // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !76 // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !78 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !80 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -184,28 +177,24 @@ fn Run() { // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) // CHECK:STDOUT: !56 = !DILocation(line: 20, column: 16, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) // CHECK:STDOUT: !60 = !DILocation(line: 20, column: 16, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !20) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) // CHECK:STDOUT: !64 = !DILocation(line: 20, column: 16, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !69) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !21) // CHECK:STDOUT: !68 = !DILocation(line: 20, column: 16, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8014ee1b1a984df0:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !21) -// CHECK:STDOUT: !72 = !DILocation(line: 20, column: 16, scope: !70) +// CHECK:STDOUT: !72 = !DILocation(line: 17, column: 26, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !77) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !21) // CHECK:STDOUT: !76 = !DILocation(line: 17, column: 26, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !21) -// CHECK:STDOUT: !80 = !DILocation(line: 17, column: 26, scope: !78) -// CHECK:STDOUT: !81 = !{!79} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interface/modifiers.carbon b/toolchain/lower/testdata/interface/modifiers.carbon index def5b6c8cb89..e6a79970165e 100644 --- a/toolchain/lower/testdata/interface/modifiers.carbon +++ b/toolchain/lower/testdata/interface/modifiers.carbon @@ -250,38 +250,31 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !57 { -// CHECK:STDOUT: call void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %t), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !53 { +// CHECK:STDOUT: call void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %t), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CHello.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: call void @_CWorld.Main.9522ff908e97e267(ptr %self), !dbg !67 -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: define linkonce_odr void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: call void @_CWorld.Main.9522ff908e97e267(ptr %self), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CWorld.Main.9522ff908e97e267(ptr %t) #0 !dbg !70 { -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: define linkonce_odr void @_CWorld.Main.9522ff908e97e267(ptr %t) #0 !dbg !66 { +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -308,28 +301,24 @@ fn F() { // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !35) // CHECK:STDOUT: !47 = !DILocation(line: 10, column: 14, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !33, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !33, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !35) // CHECK:STDOUT: !51 = !DILocation(line: 10, column: 14, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !33, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !58) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !35) -// CHECK:STDOUT: !55 = !DILocation(line: 10, column: 14, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !62) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !35) -// CHECK:STDOUT: !60 = !DILocation(line: 21, column: 3, scope: !57) -// CHECK:STDOUT: !61 = !DILocation(line: 20, column: 1, scope: !57) -// CHECK:STDOUT: !62 = !{!58} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "M", linkageName: "_CM.DefaultMethod.Main.805a971dc5455081", scope: null, file: !14, line: 13, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !69) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !35) -// CHECK:STDOUT: !67 = !DILocation(line: 13, column: 24, scope: !63) -// CHECK:STDOUT: !68 = !DILocation(line: 13, column: 3, scope: !63) -// CHECK:STDOUT: !69 = !{!64} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "World", linkageName: "_CWorld.Main.9522ff908e97e267", scope: null, file: !14, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !74) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !35) -// CHECK:STDOUT: !73 = !DILocation(line: 10, column: 1, scope: !70) -// CHECK:STDOUT: !74 = !{!71} +// CHECK:STDOUT: !56 = !DILocation(line: 21, column: 3, scope: !53) +// CHECK:STDOUT: !57 = !DILocation(line: 20, column: 1, scope: !53) +// CHECK:STDOUT: !58 = !{!54} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "M", linkageName: "_CM.DefaultMethod.Main.805a971dc5455081", scope: null, file: !14, line: 13, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !65) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !35) +// CHECK:STDOUT: !63 = !DILocation(line: 13, column: 24, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 13, column: 3, scope: !59) +// CHECK:STDOUT: !65 = !{!60} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "World", linkageName: "_CWorld.Main.9522ff908e97e267", scope: null, file: !14, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !70) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !35) +// CHECK:STDOUT: !69 = !DILocation(line: 10, column: 1, scope: !66) +// CHECK:STDOUT: !70 = !{!67} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'default_function_overridden.carbon' @@ -339,54 +328,47 @@ fn F() { // CHECK:STDOUT: @C.val.loc9_23.6 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CClone.C.Main(ptr %other) #0 !dbg !77 { +// CHECK:STDOUT: define void @_CClone.C.Main(ptr %other) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.Main:DefaultFn.Main"() #0 !dbg !82 { +// CHECK:STDOUT: define void @"_CF.C.Main:DefaultFn.Main"() #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_23.2.temp = alloca {}, align 1, !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_23.2.temp), !dbg !83 -// CHECK:STDOUT: call void @_CClone.C.Main(ptr @C.val.loc9_23.6), !dbg !84 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !85 +// CHECK:STDOUT: %.loc9_23.2.temp = alloca {}, align 1, !dbg !79 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_23.2.temp), !dbg !79 +// CHECK:STDOUT: call void @_CClone.C.Main(ptr @C.val.loc9_23.6), !dbg !80 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !79 +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !86 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !82 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !86 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !90 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CCallFn.Main.794e85173e977a8b(), !dbg !91 // CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !94 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !96 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallFn.Main.794e85173e977a8b(), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !100 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.794e85173e977a8b() #0 !dbg !101 { -// CHECK:STDOUT: call void @"_CF.C.Main:DefaultFn.Main"(), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.794e85173e977a8b() #0 !dbg !93 { +// CHECK:STDOUT: call void @"_CF.C.Main:DefaultFn.Main"(), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CHello.Main() @@ -394,7 +376,7 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!76} +// CHECK:STDOUT: !llvm.dbg.cu = !{!72} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -405,34 +387,30 @@ fn F() { // CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !36 = !{null, !35} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !75 = !DIFile(filename: "default_function_overridden.carbon", directory: "") -// CHECK:STDOUT: !76 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !75, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Clone", linkageName: "_CClone.C.Main", scope: null, file: !75, line: 6, type: !37, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !81) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !35) -// CHECK:STDOUT: !80 = !DILocation(line: 6, column: 3, scope: !77) -// CHECK:STDOUT: !81 = !{!78} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:DefaultFn.Main", scope: null, file: !75, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !76) -// CHECK:STDOUT: !83 = !DILocation(line: 9, column: 22, scope: !82) -// CHECK:STDOUT: !84 = !DILocation(line: 9, column: 14, scope: !82) -// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 5, scope: !82) -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !75, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !89) +// CHECK:STDOUT: !71 = !DIFile(filename: "default_function_overridden.carbon", directory: "") +// CHECK:STDOUT: !72 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !71, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Clone", linkageName: "_CClone.C.Main", scope: null, file: !71, line: 6, type: !37, spFlags: DISPFlagDefinition, unit: !72, retainedNodes: !77) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !35) +// CHECK:STDOUT: !76 = !DILocation(line: 6, column: 3, scope: !73) +// CHECK:STDOUT: !77 = !{!74} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:DefaultFn.Main", scope: null, file: !71, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !72) +// CHECK:STDOUT: !79 = !DILocation(line: 9, column: 22, scope: !78) +// CHECK:STDOUT: !80 = !DILocation(line: 9, column: 14, scope: !78) +// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 5, scope: !78) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !71, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !72, retainedNodes: !85) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !35) +// CHECK:STDOUT: !84 = !DILocation(line: 9, column: 22, scope: !82) +// CHECK:STDOUT: !85 = !{!83} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !71, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !72, retainedNodes: !89) // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !35) // CHECK:STDOUT: !88 = !DILocation(line: 9, column: 22, scope: !86) // CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !75, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !35) -// CHECK:STDOUT: !92 = !DILocation(line: 9, column: 22, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !75, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !35) -// CHECK:STDOUT: !96 = !DILocation(line: 9, column: 22, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !75, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !76) -// CHECK:STDOUT: !99 = !DILocation(line: 14, column: 3, scope: !98) -// CHECK:STDOUT: !100 = !DILocation(line: 13, column: 1, scope: !98) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.794e85173e977a8b", scope: null, file: !14, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !76) -// CHECK:STDOUT: !102 = !DILocation(line: 17, column: 3, scope: !101) -// CHECK:STDOUT: !103 = !DILocation(line: 16, column: 1, scope: !101) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !71, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !72) +// CHECK:STDOUT: !91 = !DILocation(line: 14, column: 3, scope: !90) +// CHECK:STDOUT: !92 = !DILocation(line: 13, column: 1, scope: !90) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.794e85173e977a8b", scope: null, file: !14, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !72) +// CHECK:STDOUT: !94 = !DILocation(line: 17, column: 3, scope: !93) +// CHECK:STDOUT: !95 = !DILocation(line: 16, column: 1, scope: !93) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'default_method_overridden.carbon' @@ -442,54 +420,47 @@ fn F() { // CHECK:STDOUT: @C.val.loc14_15.6 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCopy.C.Main(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: define void @_CCopy.C.Main(ptr %self) #0 !dbg !98 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CM.C.Main:DefaultMethod.Main"(ptr %self) #0 !dbg !111 { +// CHECK:STDOUT: define void @"_CM.C.Main:DefaultMethod.Main"(ptr %self) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCopy.C.Main(ptr %self), !dbg !114 +// CHECK:STDOUT: call void @_CCopy.C.Main(ptr %self), !dbg !106 +// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !109 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc14_15.2.temp = alloca {}, align 1, !dbg !110 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_15.2.temp), !dbg !110 +// CHECK:STDOUT: call void @_CCallMethod.Main.805a971dc5455081(ptr @C.val.loc14_15.6), !dbg !114 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !110 // CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !117 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_15.2.temp = alloca {}, align 1, !dbg !118 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_15.2.temp), !dbg !118 -// CHECK:STDOUT: call void @_CCallMethod.Main.805a971dc5455081(ptr @C.val.loc14_15.6), !dbg !122 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !118 -// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: ret void, !dbg !118 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !124 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !120 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !126 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !128 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !130 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !132 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !134 -// CHECK:STDOUT: ret void, !dbg !134 +// CHECK:STDOUT: ret void, !dbg !122 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !136 { -// CHECK:STDOUT: call void @"_CM.C.Main:DefaultMethod.Main"(ptr %t), !dbg !139 -// CHECK:STDOUT: ret void, !dbg !140 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !124 { +// CHECK:STDOUT: call void @"_CM.C.Main:DefaultMethod.Main"(ptr %t), !dbg !127 +// CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CHello.Main() @@ -497,7 +468,7 @@ fn F() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!105} +// CHECK:STDOUT: !llvm.dbg.cu = !{!97} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -508,64 +479,60 @@ fn F() { // CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !36 = !{null, !35} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !104 = !DIFile(filename: "default_method_overridden.carbon", directory: "") -// CHECK:STDOUT: !105 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !104, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.C.Main", scope: null, file: !104, line: 6, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !110) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !35) -// CHECK:STDOUT: !109 = !DILocation(line: 6, column: 3, scope: !106) -// CHECK:STDOUT: !110 = !{!107} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "M", linkageName: "_CM.C.Main:DefaultMethod.Main", scope: null, file: !104, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !116) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !35) -// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 18, scope: !111) -// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 5, scope: !111) -// CHECK:STDOUT: !116 = !{!112} -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !104, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !105) -// CHECK:STDOUT: !118 = !DILocation(line: 14, column: 14, scope: !117) -// CHECK:STDOUT: !122 = !DILocation(line: 15, column: 3, scope: !117) -// CHECK:STDOUT: !123 = !DILocation(line: 13, column: 1, scope: !117) -// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !104, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !127) +// CHECK:STDOUT: !96 = !DIFile(filename: "default_method_overridden.carbon", directory: "") +// CHECK:STDOUT: !97 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !96, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.C.Main", scope: null, file: !96, line: 6, type: !37, spFlags: DISPFlagDefinition, unit: !97, retainedNodes: !102) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !35) +// CHECK:STDOUT: !101 = !DILocation(line: 6, column: 3, scope: !98) +// CHECK:STDOUT: !102 = !{!99} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "M", linkageName: "_CM.C.Main:DefaultMethod.Main", scope: null, file: !96, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !97, retainedNodes: !108) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !35) +// CHECK:STDOUT: !106 = !DILocation(line: 9, column: 18, scope: !103) +// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 5, scope: !103) +// CHECK:STDOUT: !108 = !{!104} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !96, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !97) +// CHECK:STDOUT: !110 = !DILocation(line: 14, column: 14, scope: !109) +// CHECK:STDOUT: !114 = !DILocation(line: 15, column: 3, scope: !109) +// CHECK:STDOUT: !115 = !DILocation(line: 13, column: 1, scope: !109) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !96, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !97, retainedNodes: !119) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !35) +// CHECK:STDOUT: !118 = !DILocation(line: 14, column: 14, scope: !116) +// CHECK:STDOUT: !119 = !{!117} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !96, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !97, retainedNodes: !123) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !35) +// CHECK:STDOUT: !122 = !DILocation(line: 14, column: 14, scope: !120) +// CHECK:STDOUT: !123 = !{!121} +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !97, retainedNodes: !129) // CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !35) -// CHECK:STDOUT: !126 = !DILocation(line: 14, column: 14, scope: !124) -// CHECK:STDOUT: !127 = !{!125} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !104, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !131) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !35) -// CHECK:STDOUT: !130 = !DILocation(line: 14, column: 14, scope: !128) -// CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !104, line: 14, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !35) -// CHECK:STDOUT: !134 = !DILocation(line: 14, column: 14, scope: !132) -// CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !37, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !141) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !35) -// CHECK:STDOUT: !139 = !DILocation(line: 21, column: 3, scope: !136) -// CHECK:STDOUT: !140 = !DILocation(line: 20, column: 1, scope: !136) -// CHECK:STDOUT: !141 = !{!137} +// CHECK:STDOUT: !127 = !DILocation(line: 21, column: 3, scope: !124) +// CHECK:STDOUT: !128 = !DILocation(line: 20, column: 1, scope: !124) +// CHECK:STDOUT: !129 = !{!125} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'final_function.carbon' // CHECK:STDOUT: source_filename = "final_function.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !144 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !132 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallFn.Main.e342d6e8ff5d87ae(), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: call void @_CCallFn.Main.e342d6e8ff5d87ae(), !dbg !133 +// CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.e342d6e8ff5d87ae() #0 !dbg !147 { -// CHECK:STDOUT: call void @_CF.FinalFn.Main.e342d6e8ff5d87ae(), !dbg !148 -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.e342d6e8ff5d87ae() #0 !dbg !135 { +// CHECK:STDOUT: call void @_CF.FinalFn.Main.e342d6e8ff5d87ae(), !dbg !136 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.FinalFn.Main.e342d6e8ff5d87ae() #0 !dbg !150 { -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: define linkonce_odr void @_CF.FinalFn.Main.e342d6e8ff5d87ae() #0 !dbg !138 { +// CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!143} +// CHECK:STDOUT: !llvm.dbg.cu = !{!131} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -573,16 +540,16 @@ fn F() { // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) // CHECK:STDOUT: !20 = !DIFile(filename: "final_interfaces.carbon", directory: "") -// CHECK:STDOUT: !142 = !DIFile(filename: "final_function.carbon", directory: "") -// CHECK:STDOUT: !143 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !142, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !142, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !143) -// CHECK:STDOUT: !145 = !DILocation(line: 10, column: 3, scope: !144) -// CHECK:STDOUT: !146 = !DILocation(line: 9, column: 1, scope: !144) -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 12, type: !17, spFlags: DISPFlagDefinition, unit: !143) -// CHECK:STDOUT: !148 = !DILocation(line: 13, column: 3, scope: !147) -// CHECK:STDOUT: !149 = !DILocation(line: 12, column: 1, scope: !147) -// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "F", linkageName: "_CF.FinalFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 5, type: !17, spFlags: DISPFlagDefinition, unit: !143) -// CHECK:STDOUT: !151 = !DILocation(line: 5, column: 3, scope: !150) +// CHECK:STDOUT: !130 = !DIFile(filename: "final_function.carbon", directory: "") +// CHECK:STDOUT: !131 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !130, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !130, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !133 = !DILocation(line: 10, column: 3, scope: !132) +// CHECK:STDOUT: !134 = !DILocation(line: 9, column: 1, scope: !132) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 12, type: !17, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !136 = !DILocation(line: 13, column: 3, scope: !135) +// CHECK:STDOUT: !137 = !DILocation(line: 12, column: 1, scope: !135) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "F", linkageName: "_CF.FinalFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 5, type: !17, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !139 = !DILocation(line: 5, column: 3, scope: !138) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'final_method.carbon' @@ -592,52 +559,45 @@ fn F() { // CHECK:STDOUT: @C.val.loc10_15.6 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !154 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !142 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_15.2.temp = alloca {}, align 1, !dbg !155 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_15.2.temp), !dbg !155 -// CHECK:STDOUT: call void @_CCallMethod.Main.96e0ef8a617a6362(ptr @C.val.loc10_15.6), !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !155 -// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: %.loc10_15.2.temp = alloca {}, align 1, !dbg !143 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_15.2.temp), !dbg !143 +// CHECK:STDOUT: call void @_CCallMethod.Main.96e0ef8a617a6362(ptr @C.val.loc10_15.6), !dbg !147 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !143 +// CHECK:STDOUT: ret void, !dbg !148 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !161 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !163 +// CHECK:STDOUT: ret void, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !165 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !167 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !169 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !171 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.96e0ef8a617a6362(ptr %t) #0 !dbg !173 { -// CHECK:STDOUT: call void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %t), !dbg !176 -// CHECK:STDOUT: ret void, !dbg !177 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.96e0ef8a617a6362(ptr %t) #0 !dbg !157 { +// CHECK:STDOUT: call void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %t), !dbg !160 +// CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %self) #0 !dbg !179 { -// CHECK:STDOUT: ret void, !dbg !182 +// CHECK:STDOUT: define linkonce_odr void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: ret void, !dbg !166 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!153} +// CHECK:STDOUT: !llvm.dbg.cu = !{!141} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -648,31 +608,27 @@ fn F() { // CHECK:STDOUT: !35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !36 = !{null, !35} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !152 = !DIFile(filename: "final_method.carbon", directory: "") -// CHECK:STDOUT: !153 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !152, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !152, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !153) -// CHECK:STDOUT: !155 = !DILocation(line: 10, column: 14, scope: !154) -// CHECK:STDOUT: !159 = !DILocation(line: 11, column: 3, scope: !154) -// CHECK:STDOUT: !160 = !DILocation(line: 9, column: 1, scope: !154) -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !152, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !164) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !35) -// CHECK:STDOUT: !163 = !DILocation(line: 10, column: 14, scope: !161) -// CHECK:STDOUT: !164 = !{!162} -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !152, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !168) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !35) -// CHECK:STDOUT: !167 = !DILocation(line: 10, column: 14, scope: !165) -// CHECK:STDOUT: !168 = !{!166} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !152, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !172) -// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !35) -// CHECK:STDOUT: !171 = !DILocation(line: 10, column: 14, scope: !169) -// CHECK:STDOUT: !172 = !{!170} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 16, type: !37, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !178) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !35) -// CHECK:STDOUT: !176 = !DILocation(line: 17, column: 3, scope: !173) -// CHECK:STDOUT: !177 = !DILocation(line: 16, column: 1, scope: !173) -// CHECK:STDOUT: !178 = !{!174} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "M", linkageName: "_CM.FinalMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !153, retainedNodes: !183) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !35) -// CHECK:STDOUT: !182 = !DILocation(line: 9, column: 3, scope: !179) -// CHECK:STDOUT: !183 = !{!180} +// CHECK:STDOUT: !140 = !DIFile(filename: "final_method.carbon", directory: "") +// CHECK:STDOUT: !141 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !140, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !140, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !141) +// CHECK:STDOUT: !143 = !DILocation(line: 10, column: 14, scope: !142) +// CHECK:STDOUT: !147 = !DILocation(line: 11, column: 3, scope: !142) +// CHECK:STDOUT: !148 = !DILocation(line: 9, column: 1, scope: !142) +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !140, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !152) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !35) +// CHECK:STDOUT: !151 = !DILocation(line: 10, column: 14, scope: !149) +// CHECK:STDOUT: !152 = !{!150} +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !140, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !156) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !35) +// CHECK:STDOUT: !155 = !DILocation(line: 10, column: 14, scope: !153) +// CHECK:STDOUT: !156 = !{!154} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 16, type: !37, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !162) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !35) +// CHECK:STDOUT: !160 = !DILocation(line: 17, column: 3, scope: !157) +// CHECK:STDOUT: !161 = !DILocation(line: 16, column: 1, scope: !157) +// CHECK:STDOUT: !162 = !{!158} +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "M", linkageName: "_CM.FinalMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 9, type: !37, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !167) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !35) +// CHECK:STDOUT: !166 = !DILocation(line: 9, column: 3, scope: !163) +// CHECK:STDOUT: !167 = !{!164} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/export/class.carbon b/toolchain/lower/testdata/interop/cpp/class/export/class.carbon index a8450da53c1c..5170253aae09 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/class.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/class.carbon @@ -185,7 +185,7 @@ fn G() { // CHECK:STDOUT: define internal void @_ZN6CarbonL11CallLayoutAEPNS_7LayoutAE(ptr noundef %0) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !144 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !140 // CHECK:STDOUT: call void @_CCallLayoutA__carbon_thunk.Main(ptr noundef nonnull align 8 dereferenceable(8) %.addr) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -194,7 +194,7 @@ fn G() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon7LayoutAD2Ev(ptr noundef nonnull align 8 dead_on_return(12) dereferenceable(12) %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !144 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !140 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.LayoutA.Main"(ptr noundef nonnull align 8 dereferenceable(12) %this1) // CHECK:STDOUT: ret void @@ -218,7 +218,7 @@ fn G() { // CHECK:STDOUT: define internal void @_ZN6CarbonL11CallLayoutBEPNS_7LayoutBE(ptr noundef %0) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !146 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !142 // CHECK:STDOUT: call void @_CCallLayoutB__carbon_thunk.Main(ptr noundef nonnull align 8 dereferenceable(8) %.addr) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -227,7 +227,7 @@ fn G() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon7LayoutBD2Ev(ptr noundef nonnull align 8 dead_on_return(16) dereferenceable(16) %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !146 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !142 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.LayoutB.Main"(ptr noundef nonnull align 8 dereferenceable(16) %this1) // CHECK:STDOUT: %a = getelementptr inbounds nuw %"class.Carbon::LayoutB", ptr %this1, i32 0, i32 0 @@ -251,7 +251,7 @@ fn G() { // CHECK:STDOUT: define internal void @_ZN6CarbonL11CallLayoutCEPNS_7LayoutCE(ptr noundef %0) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !148 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !144 // CHECK:STDOUT: call void @_CCallLayoutC__carbon_thunk.Main(ptr noundef nonnull align 8 dereferenceable(8) %.addr) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -260,7 +260,7 @@ fn G() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon7LayoutCD2Ev(ptr noundef nonnull align 8 dead_on_return(16) dereferenceable(16) %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !148 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !144 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.LayoutC.Main"(ptr noundef nonnull align 8 dereferenceable(16) %this1) // CHECK:STDOUT: call void @_ZN6Carbon7LayoutAD2Ev(ptr noundef nonnull align 8 dead_on_return(12) dereferenceable(12) %this1) #5 @@ -293,134 +293,127 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #5 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #5 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #5 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core"(ptr %self) #5 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core"(ptr %self) #5 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.63f0d36eb067b612:core.Destroy.Core"(ptr %self) #5 !dbg !75 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.63f0d36eb067b612:core.Destroy.Core"(ptr %self) #5 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core"(ptr %self), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !83 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !83 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core"(ptr %self), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !87 { +// CHECK:STDOUT: define void @_CCallLayoutA__carbon_thunk.Main(ptr %_) #5 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core"(ptr %self), !dbg !89 +// CHECK:STDOUT: %.loc21 = load ptr, ptr %_, align 8, !dbg !89 +// CHECK:STDOUT: call void @_CCallLayoutA.Main(ptr %.loc21), !dbg !89 // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutA__carbon_thunk.Main(ptr %_) #5 !dbg !91 { +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutB.Main"(ptr %self) #4 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21 = load ptr, ptr %_, align 8, !dbg !93 -// CHECK:STDOUT: call void @_CCallLayoutA.Main(ptr %.loc21), !dbg !93 +// CHECK:STDOUT: call void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutB.Main"(ptr %self) #4 !dbg !95 { +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core"(ptr %self) #5 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !97 // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core"(ptr %self) #5 !dbg !99 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680fc8e588bd03e0:core.Destroy.Core"(ptr %self) #5 !dbg !99 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core"(ptr %self), !dbg !101 // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680fc8e588bd03e0:core.Destroy.Core"(ptr %self) #5 !dbg !103 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core"(ptr %self), !dbg !105 // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !107 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !107 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !109 // CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !111 { +// CHECK:STDOUT: define void @_CCallLayoutB__carbon_thunk.Main(ptr %_) #5 !dbg !111 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !113 +// CHECK:STDOUT: %.loc22 = load ptr, ptr %_, align 8, !dbg !113 +// CHECK:STDOUT: call void @_CCallLayoutB.Main(ptr %.loc22), !dbg !113 // CHECK:STDOUT: ret void, !dbg !113 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutB__carbon_thunk.Main(ptr %_) #5 !dbg !115 { +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutC.Main"(ptr %self) #4 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22 = load ptr, ptr %_, align 8, !dbg !117 -// CHECK:STDOUT: call void @_CCallLayoutB.Main(ptr %.loc22), !dbg !117 +// CHECK:STDOUT: call void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !117 // CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutC.Main"(ptr %self) #4 !dbg !119 { +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self) #5 !dbg !119 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !121 // CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self) #5 !dbg !123 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self) #5 !dbg !123 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self), !dbg !125 // CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self) #5 !dbg !127 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !127 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core"(ptr %self), !dbg !129 // CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !131 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !131 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !133 // CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !135 { +// CHECK:STDOUT: define void @_CCallLayoutC__carbon_thunk.Main(ptr %_) #5 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !137 +// CHECK:STDOUT: %.loc23 = load ptr, ptr %_, align 8, !dbg !137 +// CHECK:STDOUT: call void @_CCallLayoutC.Main(ptr %.loc23), !dbg !137 // CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutC__carbon_thunk.Main(ptr %_) #5 !dbg !139 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23 = load ptr, ptr %_, align 8, !dbg !141 -// CHECK:STDOUT: call void @_CCallLayoutC.Main(ptr %.loc23), !dbg !141 -// CHECK:STDOUT: ret void, !dbg !141 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN6Carbon7LayoutAD2Ev, { 2, 1, 0 } // CHECK:STDOUT: @@ -466,88 +459,84 @@ fn G() { // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !37) // CHECK:STDOUT: !65 = !DILocation(line: 6, column: 1, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !48, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !48, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !37) // CHECK:STDOUT: !69 = !DILocation(line: 6, column: 1, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !48, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !37) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !50) // CHECK:STDOUT: !73 = !DILocation(line: 6, column: 1, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.63f0d36eb067b612:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.63f0d36eb067b612:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !50) // CHECK:STDOUT: !77 = !DILocation(line: 6, column: 1, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.63f0d36eb067b612:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !50) // CHECK:STDOUT: !81 = !DILocation(line: 6, column: 1, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !50) // CHECK:STDOUT: !85 = !DILocation(line: 6, column: 1, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "CallLayoutA__carbon_thunk", linkageName: "_CCallLayoutA__carbon_thunk.Main", scope: null, file: !48, line: 21, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !50) -// CHECK:STDOUT: !89 = !DILocation(line: 6, column: 1, scope: !87) +// CHECK:STDOUT: !89 = !DILocation(line: 21, column: 1, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "CallLayoutA__carbon_thunk", linkageName: "_CCallLayoutA__carbon_thunk.Main", scope: null, file: !48, line: 21, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutB.Main", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !94) // CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !50) -// CHECK:STDOUT: !93 = !DILocation(line: 21, column: 1, scope: !91) +// CHECK:STDOUT: !93 = !DILocation(line: 11, column: 1, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutB.Main", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !98) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !98) // CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !50) // CHECK:STDOUT: !97 = !DILocation(line: 11, column: 1, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680fc8e588bd03e0:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !102) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680fc8e588bd03e0:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !102) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !50) // CHECK:STDOUT: !101 = !DILocation(line: 11, column: 1, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680fc8e588bd03e0:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !106) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !106) // CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !50) // CHECK:STDOUT: !105 = !DILocation(line: 11, column: 1, scope: !103) // CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !110) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !110) // CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !50) // CHECK:STDOUT: !109 = !DILocation(line: 11, column: 1, scope: !107) // CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !114) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "CallLayoutB__carbon_thunk", linkageName: "_CCallLayoutB__carbon_thunk.Main", scope: null, file: !48, line: 22, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !114) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !50) -// CHECK:STDOUT: !113 = !DILocation(line: 11, column: 1, scope: !111) +// CHECK:STDOUT: !113 = !DILocation(line: 22, column: 1, scope: !111) // CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "CallLayoutB__carbon_thunk", linkageName: "_CCallLayoutB__carbon_thunk.Main", scope: null, file: !48, line: 22, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !118) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutC.Main", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !118) // CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !50) -// CHECK:STDOUT: !117 = !DILocation(line: 22, column: 1, scope: !115) +// CHECK:STDOUT: !117 = !DILocation(line: 16, column: 1, scope: !115) // CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutC.Main", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !122) +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !122) // CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !50) // CHECK:STDOUT: !121 = !DILocation(line: 16, column: 1, scope: !119) // CHECK:STDOUT: !122 = !{!120} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d1ce4198d9e72e02:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !126) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d1ce4198d9e72e02:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !126) // CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !50) // CHECK:STDOUT: !125 = !DILocation(line: 16, column: 1, scope: !123) // CHECK:STDOUT: !126 = !{!124} -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d1ce4198d9e72e02:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !130) +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !130) // CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !50) // CHECK:STDOUT: !129 = !DILocation(line: 16, column: 1, scope: !127) // CHECK:STDOUT: !130 = !{!128} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !134) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !134) // CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !50) // CHECK:STDOUT: !133 = !DILocation(line: 16, column: 1, scope: !131) // CHECK:STDOUT: !134 = !{!132} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !138) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "CallLayoutC__carbon_thunk", linkageName: "_CCallLayoutC__carbon_thunk.Main", scope: null, file: !48, line: 23, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !138) // CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !50) -// CHECK:STDOUT: !137 = !DILocation(line: 16, column: 1, scope: !135) +// CHECK:STDOUT: !137 = !DILocation(line: 23, column: 1, scope: !135) // CHECK:STDOUT: !138 = !{!136} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "CallLayoutC__carbon_thunk", linkageName: "_CCallLayoutC__carbon_thunk.Main", scope: null, file: !48, line: 23, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !50) -// CHECK:STDOUT: !141 = !DILocation(line: 23, column: 1, scope: !139) -// CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = !{!"p1 _ZTSN6Carbon7LayoutAE", !2, i64 0} +// CHECK:STDOUT: !139 = !{!"p1 _ZTSN6Carbon7LayoutAE", !2, i64 0} +// CHECK:STDOUT: !140 = !{!139, !139, i64 0} +// CHECK:STDOUT: !141 = !{!"p1 _ZTSN6Carbon7LayoutBE", !2, i64 0} +// CHECK:STDOUT: !142 = !{!141, !141, i64 0} +// CHECK:STDOUT: !143 = !{!"p1 _ZTSN6Carbon7LayoutCE", !2, i64 0} // CHECK:STDOUT: !144 = !{!143, !143, i64 0} -// CHECK:STDOUT: !145 = !{!"p1 _ZTSN6Carbon7LayoutBE", !2, i64 0} -// CHECK:STDOUT: !146 = !{!145, !145, i64 0} -// CHECK:STDOUT: !147 = !{!"p1 _ZTSN6Carbon7LayoutCE", !2, i64 0} -// CHECK:STDOUT: !148 = !{!147, !147, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'field.carbon' @@ -574,68 +563,61 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.FieldC.Main"(ptr %self) #1 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.FieldC.Main"(ptr %self) #1 !dbg !147 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !149 +// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #2 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !153 // CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #2 !dbg !155 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #2 !dbg !155 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #2 !dbg !159 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #2 !dbg !159 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #2 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #2 !dbg !163 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !165 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !165 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #2 !dbg !167 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !167 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #2 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !173 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !173 // CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !175 { +// CHECK:STDOUT: define void @_CG.Main() #2 !dbg !175 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !177 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !181 -// CHECK:STDOUT: ret void, !dbg !181 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #2 !dbg !183 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i32, i32 }, align 4, !dbg !184 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !184 -// CHECK:STDOUT: %.loc19_34.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 0, !dbg !185 -// CHECK:STDOUT: %.loc19_34.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 1, !dbg !185 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @FieldC.val.loc19_3, i64 8, i1 false), !dbg !184 -// CHECK:STDOUT: call void @_Z1FRN6Carbon6FieldCE(ptr %c.var), !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %c.var), !dbg !184 -// CHECK:STDOUT: ret void, !dbg !190 +// CHECK:STDOUT: %c.var = alloca { i32, i32 }, align 4, !dbg !176 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !176 +// CHECK:STDOUT: %.loc19_34.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 0, !dbg !177 +// CHECK:STDOUT: %.loc19_34.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 1, !dbg !177 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @FieldC.val.loc19_3, i64 8, i1 false), !dbg !176 +// CHECK:STDOUT: call void @_Z1FRN6Carbon6FieldCE(ptr %c.var), !dbg !181 +// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %c.var), !dbg !176 +// CHECK:STDOUT: ret void, !dbg !182 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -649,7 +631,7 @@ fn G() { // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!150} +// CHECK:STDOUT: !llvm.dbg.cu = !{!146} // CHECK:STDOUT: !llvm.module.flags = !{!43, !44, !45, !19, !20} // CHECK:STDOUT: !llvm.errno.tbaa = !{!47} // CHECK:STDOUT: @@ -679,43 +661,39 @@ fn G() { // CHECK:STDOUT: !52 = !DISubroutineType(types: !51) // CHECK:STDOUT: !53 = !{null, !37} // CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !149 = !DIFile(filename: "field.carbon", directory: "") -// CHECK:STDOUT: !150 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !149, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.FieldC.Main", scope: null, file: !149, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !50) +// CHECK:STDOUT: !145 = !DIFile(filename: "field.carbon", directory: "") +// CHECK:STDOUT: !146 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !145, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.FieldC.Main", scope: null, file: !145, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !150) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !50) +// CHECK:STDOUT: !149 = !DILocation(line: 6, column: 1, scope: !147) +// CHECK:STDOUT: !150 = !{!148} +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !145, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !154) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !37) // CHECK:STDOUT: !153 = !DILocation(line: 6, column: 1, scope: !151) // CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !149, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !158) +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !145, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !158) // CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !37) // CHECK:STDOUT: !157 = !DILocation(line: 6, column: 1, scope: !155) // CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !149, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !162) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !37) +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !145, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !162) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !50) // CHECK:STDOUT: !161 = !DILocation(line: 6, column: 1, scope: !159) // CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !149, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !166) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !37) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !145, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !166) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !50) // CHECK:STDOUT: !165 = !DILocation(line: 6, column: 1, scope: !163) // CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !149, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !170) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core", scope: null, file: !145, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !170) // CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !50) // CHECK:STDOUT: !169 = !DILocation(line: 6, column: 1, scope: !167) // CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !149, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !174) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.718874c3c75b803e:core.Destroy.Core", scope: null, file: !145, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !174) // CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !50) // CHECK:STDOUT: !173 = !DILocation(line: 6, column: 1, scope: !171) // CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core", scope: null, file: !149, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !178) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !50) -// CHECK:STDOUT: !177 = !DILocation(line: 6, column: 1, scope: !175) -// CHECK:STDOUT: !178 = !{!176} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.718874c3c75b803e:core.Destroy.Core", scope: null, file: !149, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !50) -// CHECK:STDOUT: !181 = !DILocation(line: 6, column: 1, scope: !179) -// CHECK:STDOUT: !182 = !{!180} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !149, line: 18, type: !39, spFlags: DISPFlagDefinition, unit: !150) -// CHECK:STDOUT: !184 = !DILocation(line: 19, column: 3, scope: !183) -// CHECK:STDOUT: !185 = !DILocation(line: 19, column: 19, scope: !183) -// CHECK:STDOUT: !189 = !DILocation(line: 20, column: 3, scope: !183) -// CHECK:STDOUT: !190 = !DILocation(line: 18, column: 1, scope: !183) +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !145, line: 18, type: !39, spFlags: DISPFlagDefinition, unit: !146) +// CHECK:STDOUT: !176 = !DILocation(line: 19, column: 3, scope: !175) +// CHECK:STDOUT: !177 = !DILocation(line: 19, column: 19, scope: !175) +// CHECK:STDOUT: !181 = !DILocation(line: 20, column: 3, scope: !175) +// CHECK:STDOUT: !182 = !DILocation(line: 18, column: 1, scope: !175) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/export/destroy_from_thunk.carbon b/toolchain/lower/testdata/interop/cpp/class/export/destroy_from_thunk.carbon index 9536cd6848f2..61895ae6cae2 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/destroy_from_thunk.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/destroy_from_thunk.carbon @@ -68,23 +68,16 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !25 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !25 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !29 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !31 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1CD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !37 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !33 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.C.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -96,8 +89,8 @@ fn Run() { // 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.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!39, !40, !41, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!44} +// CHECK:STDOUT: !llvm.module.flags = !{!35, !36, !37, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!40} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -120,23 +113,19 @@ fn Run() { // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !11) // CHECK:STDOUT: !23 = !DILocation(line: 4, column: 1, scope: !21) // CHECK:STDOUT: !24 = !{!22} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !11) // CHECK:STDOUT: !27 = !DILocation(line: 4, column: 1, scope: !25) // CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !4, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) -// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !11) -// CHECK:STDOUT: !31 = !DILocation(line: 4, column: 1, scope: !29) -// CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !34 = !{!"omnipotent char", !33, i64 0} -// CHECK:STDOUT: !35 = !{!"any pointer", !34, i64 0} -// CHECK:STDOUT: !36 = !{!"p1 _ZTSN6Carbon1CE", !35, i64 0} -// CHECK:STDOUT: !37 = !{!36, !36, i64 0} -// CHECK:STDOUT: !39 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !40 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !42 = !{!"int", !34, i64 0} -// CHECK:STDOUT: !43 = !{!"__libc_errno", !42, i64 0} -// CHECK:STDOUT: !44 = !{!43, !42, i64 0} +// CHECK:STDOUT: !29 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !30 = !{!"omnipotent char", !29, i64 0} +// CHECK:STDOUT: !31 = !{!"any pointer", !30, i64 0} +// CHECK:STDOUT: !32 = !{!"p1 _ZTSN6Carbon1CE", !31, i64 0} +// CHECK:STDOUT: !33 = !{!32, !32, i64 0} +// CHECK:STDOUT: !35 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !36 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !37 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !38 = !{!"int", !30, i64 0} +// CHECK:STDOUT: !39 = !{!"__libc_errno", !38, i64 0} +// CHECK:STDOUT: !40 = !{!39, !38, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/export/method.carbon b/toolchain/lower/testdata/interop/cpp/class/export/method.carbon index 83b4fe7fe730..c2c6b567fc00 100644 --- a/toolchain/lower/testdata/interop/cpp/class/export/method.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/export/method.carbon @@ -91,7 +91,7 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: define internal void @_ZNK6Carbon1A1FEv(ptr noundef nonnull align 1 %this) #2 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !55 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !51 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_CF__carbon_thunk.A.Main(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -101,7 +101,7 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1AD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !55 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !51 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.A.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -130,25 +130,18 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !39 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !43 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.A.Main(ptr %self) #4 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !45 +// CHECK:STDOUT: call void @_CF.A.Main(ptr %self), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.A.Main(ptr %self) #4 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.A.Main(ptr %self), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 -// 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // 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" } @@ -157,8 +150,8 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!21} -// CHECK:STDOUT: !llvm.module.flags = !{!56, !57, !58, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} @@ -179,29 +172,25 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !22) // CHECK:STDOUT: !37 = !DILocation(line: 5, column: 1, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !20, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !20, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !22) // CHECK:STDOUT: !41 = !DILocation(line: 5, column: 1, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !20, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !20, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !22) -// CHECK:STDOUT: !45 = !DILocation(line: 5, column: 1, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 6, column: 3, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.A.Main", scope: null, file: !20, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !22) -// CHECK:STDOUT: !49 = !DILocation(line: 6, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !52 = !{!"omnipotent char", !51, i64 0} -// CHECK:STDOUT: !53 = !{!"any pointer", !52, i64 0} -// CHECK:STDOUT: !54 = !{!"p1 _ZTSN6Carbon1AE", !53, i64 0} -// CHECK:STDOUT: !55 = !{!54, !54, i64 0} -// CHECK:STDOUT: !56 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !57 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !59 = !{!"int", !52, i64 0} -// CHECK:STDOUT: !60 = !{!"__libc_errno", !59, i64 0} -// CHECK:STDOUT: !61 = !{!60, !59, i64 0} +// CHECK:STDOUT: !47 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !48 = !{!"omnipotent char", !47, i64 0} +// CHECK:STDOUT: !49 = !{!"any pointer", !48, i64 0} +// CHECK:STDOUT: !50 = !{!"p1 _ZTSN6Carbon1AE", !49, i64 0} +// CHECK:STDOUT: !51 = !{!50, !50, i64 0} +// CHECK:STDOUT: !52 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !55 = !{!"int", !48, i64 0} +// CHECK:STDOUT: !56 = !{!"__libc_errno", !55, i64 0} +// CHECK:STDOUT: !57 = !{!56, !55, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'method_with_args_and_return.carbon' @@ -233,8 +222,8 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: %retval = alloca i32, align 4 // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca i32, align 4 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !110 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !111 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !102 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !103 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_CF__carbon_thunk.ArgsA.Main(ptr noundef nonnull align 1 %this1, ptr noundef nonnull align 4 dereferenceable(4) %.addr, ptr noundef nonnull align 4 dereferenceable(4) %retval) // CHECK:STDOUT: %1 = load i32, ptr %retval, align 4 @@ -245,7 +234,7 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon5ArgsAD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !110 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !102 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.ArgsA.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -255,51 +244,44 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: declare void @llvm.lifetime.end.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.ArgsA.Main(ptr %self, i32 %a) #4 !dbg !71 { +// CHECK:STDOUT: define i32 @_CF.ArgsA.Main(ptr %self, i32 %a) #4 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !80 +// CHECK:STDOUT: ret i32 %a, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.ArgsA.Main"(ptr %self) #5 !dbg !82 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.ArgsA.Main"(ptr %self) #5 !dbg !78 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #4 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self), !dbg !84 // CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #4 !dbg !86 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self) #4 !dbg !86 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self) #4 !dbg !90 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.ArgsA.Main(ptr %self, ptr %_, ptr %_1) #4 !dbg !90 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: %.loc6_29.2 = load i32, ptr %_, align 4, !dbg !94 +// CHECK:STDOUT: %ArgsA.F.call = call i32 @_CF.ArgsA.Main(ptr %self, i32 %.loc6_29.2), !dbg !94 +// CHECK:STDOUT: store i32 %ArgsA.F.call, ptr %_1, align 4, !dbg !94 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self) #4 !dbg !94 { +// CHECK:STDOUT: define i32 @_CCallCallF.Main() #4 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !96 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.ArgsA.Main(ptr %self, ptr %_, ptr %_1) #4 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_29.2 = load i32, ptr %_, align 4, !dbg !102 -// CHECK:STDOUT: %ArgsA.F.call = call i32 @_CF.ArgsA.Main(ptr %self, i32 %.loc6_29.2), !dbg !102 -// CHECK:STDOUT: store i32 %ArgsA.F.call, ptr %_1, align 4, !dbg !102 -// CHECK:STDOUT: ret void, !dbg !102 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallCallF.Main() #4 !dbg !104 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %CallArgsF.call = call i32 @_Z9CallArgsFv(), !dbg !107 -// CHECK:STDOUT: ret i32 %CallArgsF.call, !dbg !108 +// CHECK:STDOUT: %CallArgsF.call = call i32 @_Z9CallArgsFv(), !dbg !99 +// CHECK:STDOUT: ret i32 %CallArgsF.call, !dbg !100 // 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" } @@ -309,66 +291,62 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #4 = { nounwind } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!63} -// CHECK:STDOUT: !llvm.module.flags = !{!56, !57, !58, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.dbg.cu = !{!59} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{null, !22} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !51 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !52 = !{!"omnipotent char", !51, i64 0} -// CHECK:STDOUT: !53 = !{!"any pointer", !52, i64 0} -// CHECK:STDOUT: !56 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !57 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !59 = !{!"int", !52, i64 0} -// CHECK:STDOUT: !60 = !{!"__libc_errno", !59, i64 0} -// CHECK:STDOUT: !61 = !{!60, !59, i64 0} -// CHECK:STDOUT: !62 = !DIFile(filename: "method_with_args_and_return.carbon", directory: "") -// CHECK:STDOUT: !63 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !62, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !64 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !65 = !{!64, !22, !64} +// CHECK:STDOUT: !47 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !48 = !{!"omnipotent char", !47, i64 0} +// CHECK:STDOUT: !49 = !{!"any pointer", !48, i64 0} +// CHECK:STDOUT: !52 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !55 = !{!"int", !48, i64 0} +// CHECK:STDOUT: !56 = !{!"__libc_errno", !55, i64 0} +// CHECK:STDOUT: !57 = !{!56, !55, i64 0} +// CHECK:STDOUT: !58 = !DIFile(filename: "method_with_args_and_return.carbon", directory: "") +// CHECK:STDOUT: !59 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !58, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !60 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !61 = !{!60, !22, !60} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !63 = !{null, !22, !60, !60} +// CHECK:STDOUT: !64 = !DISubroutineType(types: !63) +// CHECK:STDOUT: !65 = !{!60} // CHECK:STDOUT: !66 = !DISubroutineType(types: !65) -// CHECK:STDOUT: !67 = !{null, !22, !64, !64} -// CHECK:STDOUT: !68 = !DISubroutineType(types: !67) -// CHECK:STDOUT: !69 = !{!64} -// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "F", linkageName: "_CF.ArgsA.Main", scope: null, file: !62, line: 6, type: !66, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !81) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !22) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 2, scope: !71, type: !64) -// CHECK:STDOUT: !80 = !DILocation(line: 8, column: 5, scope: !71) -// CHECK:STDOUT: !81 = !{!72, !73} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.ArgsA.Main", scope: null, file: !62, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !85) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F", linkageName: "_CF.ArgsA.Main", scope: null, file: !58, line: 6, type: !62, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !77) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !22) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 2, scope: !67, type: !60) +// CHECK:STDOUT: !76 = !DILocation(line: 8, column: 5, scope: !67) +// CHECK:STDOUT: !77 = !{!68, !69} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.ArgsA.Main", scope: null, file: !58, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !22) +// CHECK:STDOUT: !80 = !DILocation(line: 5, column: 1, scope: !78) +// CHECK:STDOUT: !81 = !{!79} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !58, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !85) // CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !22) // CHECK:STDOUT: !84 = !DILocation(line: 5, column: 1, scope: !82) // CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !62, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !89) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core", scope: null, file: !58, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !89) // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !22) // CHECK:STDOUT: !88 = !DILocation(line: 5, column: 1, scope: !86) // CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.eefdfd667b52bf5b:core.Destroy.Core", scope: null, file: !62, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !93) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.ArgsA.Main", scope: null, file: !58, line: 6, type: !64, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !95) // CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !22) -// CHECK:STDOUT: !92 = !DILocation(line: 5, column: 1, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core", scope: null, file: !62, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !22) -// CHECK:STDOUT: !96 = !DILocation(line: 5, column: 1, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.ArgsA.Main", scope: null, file: !62, line: 6, type: !68, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !103) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !22) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !64) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 3, scope: !98, type: !64) -// CHECK:STDOUT: !102 = !DILocation(line: 6, column: 3, scope: !98) -// CHECK:STDOUT: !103 = !{!99, !100, !101} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !62, line: 18, type: !70, spFlags: DISPFlagDefinition, unit: !63) -// CHECK:STDOUT: !107 = !DILocation(line: 18, column: 32, scope: !104) -// CHECK:STDOUT: !108 = !DILocation(line: 18, column: 25, scope: !104) -// CHECK:STDOUT: !109 = !{!"p1 _ZTSN6Carbon5ArgsAE", !53, i64 0} -// CHECK:STDOUT: !110 = !{!109, !109, i64 0} -// CHECK:STDOUT: !111 = !{!59, !59, i64 0} +// CHECK:STDOUT: !92 = !DILocalVariable(arg: 2, scope: !90, type: !60) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 3, scope: !90, type: !60) +// CHECK:STDOUT: !94 = !DILocation(line: 6, column: 3, scope: !90) +// CHECK:STDOUT: !95 = !{!91, !92, !93} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !58, line: 18, type: !66, spFlags: DISPFlagDefinition, unit: !59) +// CHECK:STDOUT: !99 = !DILocation(line: 18, column: 32, scope: !96) +// CHECK:STDOUT: !100 = !DILocation(line: 18, column: 25, scope: !96) +// CHECK:STDOUT: !101 = !{!"p1 _ZTSN6Carbon5ArgsAE", !49, i64 0} +// CHECK:STDOUT: !102 = !{!101, !101, i64 0} +// CHECK:STDOUT: !103 = !{!55, !55, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'static.carbon' @@ -391,49 +369,42 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.StaticA.Main() #2 !dbg !116 { +// CHECK:STDOUT: define void @_CF.StaticA.Main() #2 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.StaticA.Main"(ptr %self) #3 !dbg !118 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.StaticA.Main"(ptr %self) #3 !dbg !110 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core"(ptr %self), !dbg !112 +// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #2 !dbg !114 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core"(ptr %self) #2 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core"(ptr %self), !dbg !120 // CHECK:STDOUT: ret void, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #2 !dbg !122 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.StaticA.Main() #2 !dbg !122 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !124 +// CHECK:STDOUT: call void @_CF.StaticA.Main(), !dbg !123 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1be3804f96ff0532:core.Destroy.Core"(ptr %self) #2 !dbg !126 { +// CHECK:STDOUT: define void @_CCallCallF.Main() #2 !dbg !124 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !128 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core"(ptr %self) #2 !dbg !130 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1be3804f96ff0532:core.Destroy.Core"(ptr %self), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !132 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.StaticA.Main() #2 !dbg !134 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.StaticA.Main(), !dbg !135 -// CHECK:STDOUT: ret void, !dbg !135 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallCallF.Main() #2 !dbg !136 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z11CallStaticFv(), !dbg !137 -// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: call void @_Z11CallStaticFv(), !dbg !125 +// CHECK:STDOUT: ret void, !dbg !126 // 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" } @@ -441,48 +412,44 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!113} -// CHECK:STDOUT: !llvm.module.flags = !{!56, !57, !58, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.dbg.cu = !{!105} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{null, !22} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !51 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !52 = !{!"omnipotent char", !51, i64 0} -// CHECK:STDOUT: !56 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !57 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !59 = !{!"int", !52, i64 0} -// CHECK:STDOUT: !60 = !{!"__libc_errno", !59, i64 0} -// CHECK:STDOUT: !61 = !{!60, !59, i64 0} -// CHECK:STDOUT: !112 = !DIFile(filename: "static.carbon", directory: "") -// CHECK:STDOUT: !113 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !112, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !114 = !{null} -// CHECK:STDOUT: !115 = !DISubroutineType(types: !114) -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "F", linkageName: "_CF.StaticA.Main", scope: null, file: !112, line: 6, type: !115, spFlags: DISPFlagDefinition, unit: !113) -// CHECK:STDOUT: !117 = !DILocation(line: 6, column: 3, scope: !116) -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.StaticA.Main", scope: null, file: !112, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !113, retainedNodes: !121) +// CHECK:STDOUT: !47 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !48 = !{!"omnipotent char", !47, i64 0} +// CHECK:STDOUT: !52 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !55 = !{!"int", !48, i64 0} +// CHECK:STDOUT: !56 = !{!"__libc_errno", !55, i64 0} +// CHECK:STDOUT: !57 = !{!56, !55, i64 0} +// CHECK:STDOUT: !104 = !DIFile(filename: "static.carbon", directory: "") +// CHECK:STDOUT: !105 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !104, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !106 = !{null} +// CHECK:STDOUT: !107 = !DISubroutineType(types: !106) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "F", linkageName: "_CF.StaticA.Main", scope: null, file: !104, line: 6, type: !107, spFlags: DISPFlagDefinition, unit: !105) +// CHECK:STDOUT: !109 = !DILocation(line: 6, column: 3, scope: !108) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.StaticA.Main", scope: null, file: !104, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !113) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !22) +// CHECK:STDOUT: !112 = !DILocation(line: 5, column: 1, scope: !110) +// CHECK:STDOUT: !113 = !{!111} +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !104, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !117) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !22) +// CHECK:STDOUT: !116 = !DILocation(line: 5, column: 1, scope: !114) +// CHECK:STDOUT: !117 = !{!115} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core", scope: null, file: !104, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !105, retainedNodes: !121) // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !22) // CHECK:STDOUT: !120 = !DILocation(line: 5, column: 1, scope: !118) // CHECK:STDOUT: !121 = !{!119} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !112, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !113, retainedNodes: !125) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !22) -// CHECK:STDOUT: !124 = !DILocation(line: 5, column: 1, scope: !122) -// CHECK:STDOUT: !125 = !{!123} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1be3804f96ff0532:core.Destroy.Core", scope: null, file: !112, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !113, retainedNodes: !129) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !22) -// CHECK:STDOUT: !128 = !DILocation(line: 5, column: 1, scope: !126) -// CHECK:STDOUT: !129 = !{!127} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core", scope: null, file: !112, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !113, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !22) -// CHECK:STDOUT: !132 = !DILocation(line: 5, column: 1, scope: !130) -// CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.StaticA.Main", scope: null, file: !112, line: 6, type: !115, spFlags: DISPFlagDefinition, unit: !113) -// CHECK:STDOUT: !135 = !DILocation(line: 6, column: 3, scope: !134) -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !112, line: 15, type: !115, spFlags: DISPFlagDefinition, unit: !113) -// CHECK:STDOUT: !137 = !DILocation(line: 15, column: 18, scope: !136) -// CHECK:STDOUT: !138 = !DILocation(line: 15, column: 1, scope: !136) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.StaticA.Main", scope: null, file: !104, line: 6, type: !107, spFlags: DISPFlagDefinition, unit: !105) +// CHECK:STDOUT: !123 = !DILocation(line: 6, column: 3, scope: !122) +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !104, line: 15, type: !107, spFlags: DISPFlagDefinition, unit: !105) +// CHECK:STDOUT: !125 = !DILocation(line: 15, column: 18, scope: !124) +// CHECK:STDOUT: !126 = !DILocation(line: 15, column: 1, scope: !124) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon b/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon index cbfd3749d3b1..2bd14299f6c5 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon @@ -345,8 +345,8 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: define internal noundef i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr noundef nonnull align 1 dereferenceable(1) %this) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !140 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !140, !nonnull !54 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !136 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !136, !nonnull !54 // CHECK:STDOUT: %call = call noundef i32 @_ZNK4IntBcviEv(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } @@ -358,23 +358,16 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !123 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !123 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !127 { +// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !127 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !129 -// CHECK:STDOUT: ret void, !dbg !129 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !131 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !134 -// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -420,19 +413,15 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !20) // CHECK:STDOUT: !121 = !DILocation(line: 12, column: 3, scope: !119) // CHECK:STDOUT: !122 = !{!120} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !105, line: 12, type: !110, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !126) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !105, line: 12, type: !110, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !126) // CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !20) // CHECK:STDOUT: !125 = !DILocation(line: 12, column: 3, scope: !123) // CHECK:STDOUT: !126 = !{!124} -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !105, line: 12, type: !110, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !130) -// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !20) -// CHECK:STDOUT: !129 = !DILocation(line: 12, column: 3, scope: !127) -// CHECK:STDOUT: !130 = !{!128} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !105, line: 15, type: !23, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !138) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !21) -// CHECK:STDOUT: !134 = !DILocation(line: 16, column: 27, scope: !131) -// CHECK:STDOUT: !137 = !DILocation(line: 15, column: 1, scope: !131) -// CHECK:STDOUT: !138 = !{!132} -// CHECK:STDOUT: !139 = !{!"p1 _ZTS4IntB", !48, i64 0} -// CHECK:STDOUT: !140 = !{!139, !139, i64 0} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !105, line: 15, type: !23, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !134) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !21) +// CHECK:STDOUT: !130 = !DILocation(line: 16, column: 27, scope: !127) +// CHECK:STDOUT: !133 = !DILocation(line: 15, column: 1, scope: !127) +// CHECK:STDOUT: !134 = !{!128} +// CHECK:STDOUT: !135 = !{!"p1 _ZTS4IntB", !48, i64 0} +// CHECK:STDOUT: !136 = !{!135, !135, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/method.carbon b/toolchain/lower/testdata/interop/cpp/class/import/method.carbon index 6c6ee7b602da..46c6b84c9bcc 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/method.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/method.carbon @@ -346,11 +346,11 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %c.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !98 -// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !100 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !98, !nonnull !42 -// CHECK:STDOUT: %1 = load ptr, ptr %c.addr, align 8, !tbaa !100 -// CHECK:STDOUT: %2 = load i8, ptr %1, align 1, !tbaa !102 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !94 +// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !96 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !94, !nonnull !42 +// CHECK:STDOUT: %1 = load ptr, ptr %c.addr, align 8, !tbaa !96 +// CHECK:STDOUT: %2 = load i8, ptr %1, align 1, !tbaa !98 // CHECK:STDOUT: call void @_ZNK9NeedThunk8ImplicitEa(ptr noundef nonnull align 1 dereferenceable(1) %0, i8 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -362,29 +362,22 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !95 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZNH9NeedThunk8ExplicitES_a.carbon_thunk.__(ptr noundef %0, ptr noundef %c) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %c.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.NeedThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !98 -// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !100 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !98 -// CHECK:STDOUT: %2 = load ptr, ptr %c.addr, align 8, !tbaa !100 -// CHECK:STDOUT: %3 = load i8, ptr %2, align 1, !tbaa !102 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !94 +// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !96 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !94 +// CHECK:STDOUT: %2 = load ptr, ptr %c.addr, align 8, !tbaa !96 +// CHECK:STDOUT: %3 = load i8, ptr %2, align 1, !tbaa !98 // CHECK:STDOUT: call void @_ZNH9NeedThunk8ExplicitES_a(i8 noundef signext %3) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -441,19 +434,15 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !71) // CHECK:STDOUT: !87 = !DILocation(line: 7, column: 14, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core", scope: null, file: !69, line: 7, type: !75, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !92) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !69, line: 7, type: !75, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !92) // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !71) // CHECK:STDOUT: !91 = !DILocation(line: 7, column: 14, scope: !89) // CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !69, line: 7, type: !75, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !71) -// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 14, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = !{!"p1 _ZTS9NeedThunk", !36, i64 0} -// CHECK:STDOUT: !98 = !{!97, !97, i64 0} -// CHECK:STDOUT: !99 = !{!"p1 omnipotent char", !36, i64 0} -// CHECK:STDOUT: !100 = !{!99, !99, i64 0} -// CHECK:STDOUT: !102 = !{!35, !35, i64 0} +// CHECK:STDOUT: !93 = !{!"p1 _ZTS9NeedThunk", !36, i64 0} +// CHECK:STDOUT: !94 = !{!93, !93, i64 0} +// CHECK:STDOUT: !95 = !{!"p1 omnipotent char", !36, i64 0} +// CHECK:STDOUT: !96 = !{!95, !95, i64 0} +// CHECK:STDOUT: !98 = !{!35, !35, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_with_ref_self.carbon' @@ -462,10 +451,10 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr %r) #0 !dbg !107 { +// CHECK:STDOUT: define void @_CF.Main(ptr %r) #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN8RefSelfA1fEii(ptr %r, i32 1, i32 2), !dbg !110 -// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: call void @_ZN8RefSelfA1fEii(ptr %r, i32 1, i32 2), !dbg !106 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN8RefSelfA1fEii(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) #1 @@ -473,7 +462,7 @@ fn F(ref r: Cpp.RefSelfA) { // 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.dbg.cu = !{!104} +// CHECK:STDOUT: !llvm.dbg.cu = !{!100} // CHECK:STDOUT: !llvm.module.flags = !{!45, !46, !47, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: @@ -490,11 +479,11 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: !47 = !{i32 7, !"uwtable", i32 2} // CHECK:STDOUT: !48 = !{!"__libc_errno", !40, i64 0} // CHECK:STDOUT: !49 = !{!48, !40, i64 0} -// CHECK:STDOUT: !103 = !DIFile(filename: "call_with_ref_self.carbon", directory: "") -// CHECK:STDOUT: !104 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !103, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !103, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !112) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !21) -// CHECK:STDOUT: !110 = !DILocation(line: 12, column: 3, scope: !107) -// CHECK:STDOUT: !111 = !DILocation(line: 11, column: 1, scope: !107) -// CHECK:STDOUT: !112 = !{!108} +// CHECK:STDOUT: !99 = !DIFile(filename: "call_with_ref_self.carbon", directory: "") +// CHECK:STDOUT: !100 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !99, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !99, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !100, retainedNodes: !108) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !21) +// CHECK:STDOUT: !106 = !DILocation(line: 12, column: 3, scope: !103) +// CHECK:STDOUT: !107 = !DILocation(line: 11, column: 1, scope: !103) +// CHECK:STDOUT: !108 = !{!104} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon b/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon index 0f3bb29fa820..619579fc0a0f 100644 --- a/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon @@ -54,8 +54,8 @@ void f() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca i32, align 4 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !42 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !36 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !38 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_COneArg__carbon_thunk.OneArg.Main(ptr noundef nonnull align 1 %this1, ptr noundef nonnull align 4 dereferenceable(4) %.addr) // CHECK:STDOUT: ret void @@ -65,7 +65,7 @@ void f() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon6OneArgD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !40 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !36 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.OneArg.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -90,24 +90,17 @@ void f() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !23 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !23 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core"(ptr %self) #5 !dbg !27 { +// CHECK:STDOUT: define void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !27 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core"(ptr %self), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !29 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !31 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_28.2 = load i32, ptr %_1, align 4, !dbg !34 -// CHECK:STDOUT: call void @_COneArg.OneArg.Main(ptr %_, i32 %.loc6_28.2), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: %.loc6_28.2 = load i32, ptr %_1, align 4, !dbg !30 +// CHECK:STDOUT: call void @_COneArg.OneArg.Main(ptr %_, i32 %.loc6_28.2), !dbg !30 +// CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { 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" } @@ -118,8 +111,8 @@ void f() { // CHECK:STDOUT: attributes #5 = { nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!6} -// CHECK:STDOUT: !llvm.module.flags = !{!43, !44, !45, !3, !4} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!47} +// CHECK:STDOUT: !llvm.module.flags = !{!39, !40, !41, !3, !4} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!43} // CHECK:STDOUT: // CHECK:STDOUT: !3 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !4 = !{i32 2, !"Debug Info Version", i32 3} @@ -139,29 +132,25 @@ void f() { // CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !8) // CHECK:STDOUT: !21 = !DILocation(line: 5, column: 1, scope: !19) // CHECK:STDOUT: !22 = !{!20} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !26) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !26) // CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !8) // CHECK:STDOUT: !25 = !DILocation(line: 5, column: 1, scope: !23) // CHECK:STDOUT: !26 = !{!24} -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !30) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "OneArg__carbon_thunk", linkageName: "_COneArg__carbon_thunk.OneArg.Main", scope: null, file: !5, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !31) // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !8) -// CHECK:STDOUT: !29 = !DILocation(line: 5, column: 1, scope: !27) -// CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "OneArg__carbon_thunk", linkageName: "_COneArg__carbon_thunk.OneArg.Main", scope: null, file: !5, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !35) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !8) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !31, type: !7) -// CHECK:STDOUT: !34 = !DILocation(line: 6, column: 3, scope: !31) -// CHECK:STDOUT: !35 = !{!32, !33} -// CHECK:STDOUT: !36 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !37 = !{!"omnipotent char", !36, i64 0} -// CHECK:STDOUT: !38 = !{!"any pointer", !37, i64 0} -// CHECK:STDOUT: !39 = !{!"p1 _ZTSN6Carbon6OneArgE", !38, i64 0} -// CHECK:STDOUT: !40 = !{!39, !39, i64 0} -// CHECK:STDOUT: !41 = !{!"int", !37, i64 0} -// CHECK:STDOUT: !42 = !{!41, !41, i64 0} -// CHECK:STDOUT: !43 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !44 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !45 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !46 = !{!"__libc_errno", !41, i64 0} -// CHECK:STDOUT: !47 = !{!46, !41, i64 0} +// CHECK:STDOUT: !29 = !DILocalVariable(arg: 2, scope: !27, type: !7) +// CHECK:STDOUT: !30 = !DILocation(line: 6, column: 3, scope: !27) +// CHECK:STDOUT: !31 = !{!28, !29} +// CHECK:STDOUT: !32 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !33 = !{!"omnipotent char", !32, i64 0} +// CHECK:STDOUT: !34 = !{!"any pointer", !33, i64 0} +// CHECK:STDOUT: !35 = !{!"p1 _ZTSN6Carbon6OneArgE", !34, i64 0} +// CHECK:STDOUT: !36 = !{!35, !35, i64 0} +// CHECK:STDOUT: !37 = !{!"int", !33, i64 0} +// CHECK:STDOUT: !38 = !{!37, !37, i64 0} +// CHECK:STDOUT: !39 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !40 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !41 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !42 = !{!"__libc_errno", !37, i64 0} +// CHECK:STDOUT: !43 = !{!42, !37, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon b/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon index 3449c4649f2b..ea3da8b56cc8 100644 --- a/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon @@ -142,7 +142,7 @@ fn Run() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1AD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !83 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !75 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.A.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -160,7 +160,7 @@ fn Run() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon1BD2Ev(ptr noundef nonnull align 1 %this) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !85 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !77 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @"_C__destroy_thunk:thunk.B.Main"(ptr noundef nonnull align 1 %this1) // CHECK:STDOUT: ret void @@ -195,71 +195,57 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !40 { +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.B.Main"(ptr %self) #5 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !42 +// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.B.Main"(ptr %self) #5 !dbg !44 { +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !46 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !48 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !48 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !52 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !54 +// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !56 { +// CHECK:STDOUT: define i32 @main() #4 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: call void @_Z1Gv(), !dbg !57 +// CHECK:STDOUT: ret i32 0, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !60 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: call void @"_CDoit.A.Main:I.Main"(ptr %t), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #4 !dbg !64 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d53b17eed3ce903c(ptr %t) #4 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z1Gv(), !dbg !65 -// CHECK:STDOUT: ret i32 0, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !67 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CDoit.A.Main:I.Main"(ptr %t), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !71 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d53b17eed3ce903c(ptr %t) #4 !dbg !73 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CDoit.B.Main:I.Main"(ptr %t), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @"_CDoit.B.Main:I.Main"(ptr %t), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -276,8 +262,8 @@ fn Run() { // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!9} -// CHECK:STDOUT: !llvm.module.flags = !{!86, !87, !88, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!91} +// CHECK:STDOUT: !llvm.module.flags = !{!78, !79, !80, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} @@ -305,58 +291,50 @@ fn Run() { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !10) // CHECK:STDOUT: !34 = !DILocation(line: 8, column: 1, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !10) // CHECK:STDOUT: !38 = !DILocation(line: 8, column: 1, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !10) -// CHECK:STDOUT: !42 = !DILocation(line: 8, column: 1, scope: !40) +// CHECK:STDOUT: !42 = !DILocation(line: 13, column: 1, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !10) // CHECK:STDOUT: !46 = !DILocation(line: 13, column: 1, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "F__carbon_thunk.26f2099a79512a5d", linkageName: "_CF__carbon_thunk.26f2099a79512a5d.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !51) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !10) -// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 1, scope: !48) +// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 1, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !8, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F__carbon_thunk.7a3b9f04ddf4269e", linkageName: "_CF__carbon_thunk.7a3b9f04ddf4269e.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !10) -// CHECK:STDOUT: !54 = !DILocation(line: 13, column: 1, scope: !52) +// CHECK:STDOUT: !54 = !DILocation(line: 19, column: 1, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F__carbon_thunk.26f2099a79512a5d", linkageName: "_CF__carbon_thunk.26f2099a79512a5d.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !10) -// CHECK:STDOUT: !58 = !DILocation(line: 19, column: 1, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "F__carbon_thunk.7a3b9f04ddf4269e", linkageName: "_CF__carbon_thunk.7a3b9f04ddf4269e.Main", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !10) -// CHECK:STDOUT: !62 = !DILocation(line: 19, column: 1, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !8, line: 32, type: !15, spFlags: DISPFlagDefinition, unit: !9) -// CHECK:STDOUT: !65 = !DILocation(line: 33, column: 3, scope: !64) -// CHECK:STDOUT: !66 = !DILocation(line: 32, column: 1, scope: !64) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6662a1ffb773360a", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !72) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !10) -// CHECK:STDOUT: !70 = !DILocation(line: 20, column: 3, scope: !67) -// CHECK:STDOUT: !71 = !DILocation(line: 19, column: 1, scope: !67) -// CHECK:STDOUT: !72 = !{!68} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d53b17eed3ce903c", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !78) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !10) -// CHECK:STDOUT: !76 = !DILocation(line: 20, column: 3, scope: !73) -// CHECK:STDOUT: !77 = !DILocation(line: 19, column: 1, scope: !73) -// CHECK:STDOUT: !78 = !{!74} -// CHECK:STDOUT: !79 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !80 = !{!"omnipotent char", !79, i64 0} -// CHECK:STDOUT: !81 = !{!"any pointer", !80, i64 0} -// CHECK:STDOUT: !82 = !{!"p1 _ZTSN6Carbon1AE", !81, i64 0} -// CHECK:STDOUT: !83 = !{!82, !82, i64 0} -// CHECK:STDOUT: !84 = !{!"p1 _ZTSN6Carbon1BE", !81, i64 0} -// CHECK:STDOUT: !85 = !{!84, !84, i64 0} -// CHECK:STDOUT: !86 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !87 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !88 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !89 = !{!"int", !80, i64 0} -// CHECK:STDOUT: !90 = !{!"__libc_errno", !89, i64 0} -// CHECK:STDOUT: !91 = !{!90, !89, i64 0} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !8, line: 32, type: !15, spFlags: DISPFlagDefinition, unit: !9) +// CHECK:STDOUT: !57 = !DILocation(line: 33, column: 3, scope: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !56) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6662a1ffb773360a", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !64) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !10) +// CHECK:STDOUT: !62 = !DILocation(line: 20, column: 3, scope: !59) +// CHECK:STDOUT: !63 = !DILocation(line: 19, column: 1, scope: !59) +// CHECK:STDOUT: !64 = !{!60} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d53b17eed3ce903c", scope: null, file: !8, line: 19, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !70) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !10) +// CHECK:STDOUT: !68 = !DILocation(line: 20, column: 3, scope: !65) +// CHECK:STDOUT: !69 = !DILocation(line: 19, column: 1, scope: !65) +// CHECK:STDOUT: !70 = !{!66} +// CHECK:STDOUT: !71 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !72 = !{!"omnipotent char", !71, i64 0} +// CHECK:STDOUT: !73 = !{!"any pointer", !72, i64 0} +// CHECK:STDOUT: !74 = !{!"p1 _ZTSN6Carbon1AE", !73, i64 0} +// CHECK:STDOUT: !75 = !{!74, !74, i64 0} +// CHECK:STDOUT: !76 = !{!"p1 _ZTSN6Carbon1BE", !73, i64 0} +// CHECK:STDOUT: !77 = !{!76, !76, i64 0} +// CHECK:STDOUT: !78 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !79 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !80 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !81 = !{!"int", !72, i64 0} +// CHECK:STDOUT: !82 = !{!"__libc_errno", !81, i64 0} +// CHECK:STDOUT: !83 = !{!82, !81, i64 0} // CHECK:STDOUT: 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 247357c6eec7..4c9d89805d48 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon @@ -427,8 +427,8 @@ fn MyF() -> i32 { // CHECK:STDOUT: define internal void @_Z13NoReturnValueii.carbon_thunk._(i32 noundef %a) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.addr = alloca i32, align 4 -// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !95 -// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !95 +// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !91 +// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !91 // CHECK:STDOUT: call void @_Z13NoReturnValueii(i32 noundef %0, i32 noundef 2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -446,8 +446,8 @@ fn MyF() -> i32 { // CHECK:STDOUT: define internal noundef i32 @_Z17SimpleReturnValueii.carbon_thunk._(i32 noundef %a) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.addr = alloca i32, align 4 -// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !95 -// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !95 +// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !91 +// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !91 // CHECK:STDOUT: %call = call noundef i32 @_Z17SimpleReturnValueii(i32 noundef %0, i32 noundef 2) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } @@ -461,18 +461,11 @@ fn MyF() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !91 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !93 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: @@ -522,13 +515,9 @@ fn MyF() -> i32 { // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !57) // CHECK:STDOUT: !85 = !DILocation(line: 11, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !57) // CHECK:STDOUT: !89 = !DILocation(line: 11, column: 3, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !57) -// CHECK:STDOUT: !93 = !DILocation(line: 11, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = !{!30, !30, i64 0} +// CHECK:STDOUT: !91 = !{!30, !30, i64 0} // CHECK:STDOUT: 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 7c7f2a641b03..67d999ba51a7 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon @@ -59,18 +59,11 @@ fn Call() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !49 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: @@ -79,8 +72,8 @@ fn Call() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!26} -// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !9, !10} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.module.flags = !{!53, !54, !55, !9, !10} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -107,17 +100,13 @@ fn Call() -> i32 { // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !27) // CHECK:STDOUT: !47 = !DILocation(line: 22, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !27) // CHECK:STDOUT: !51 = !DILocation(line: 22, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !27) -// CHECK:STDOUT: !55 = !DILocation(line: 22, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !59 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !60 = !{!"__libc_errno", !2, i64 0} -// CHECK:STDOUT: !61 = !{!60, !2, i64 0} +// CHECK:STDOUT: !53 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !55 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !56 = !{!"__libc_errno", !2, i64 0} +// CHECK:STDOUT: !57 = !{!56, !2, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon index 6df4f50c4547..1090a3133f89 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon @@ -148,16 +148,16 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr1 = alloca ptr, align 8 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i64, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !140 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !143 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !145 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !147 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !140 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !148 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !143 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !149 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !145 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !147 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !124 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !127 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !129 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !131 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !124 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !132 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !127 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !133 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !129 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !131 // CHECK:STDOUT: call void @_Z11pass_signedasil(i8 noundef signext %5, i16 noundef signext %7, i32 noundef %8, i64 noundef %9) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -169,37 +169,23 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self), !dbg !79 // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !87 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self), !dbg !91 -// CHECK:STDOUT: ret void, !dbg !91 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3) #1 { // CHECK:STDOUT: entry: @@ -207,96 +193,82 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr1 = alloca ptr, align 8 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i64, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !140 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !143 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !145 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !147 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !140 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !148 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !143 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !149 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !145 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !147 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !124 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !127 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !129 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !131 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !124 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !132 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !127 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !133 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !129 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !131 // CHECK:STDOUT: call void @_Z13pass_unsignedhtjm(i8 noundef zeroext %5, i16 noundef zeroext %7, i32 noundef %8, i64 noundef %9) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !93 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !91 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self), !dbg !103 -// CHECK:STDOUT: ret void, !dbg !103 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !105 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !107 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !109 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !111 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self), !dbg !115 -// CHECK:STDOUT: ret void, !dbg !115 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare i16 @_CMakeShort.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !117 { +// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !122 -// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !125 -// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !127 -// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !129 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !122 -// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !122 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !122 -// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !125 -// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !125 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !126 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !125 -// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !127 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !127 -// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !127 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !128 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !127 -// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !129 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !129 -// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !129 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !130 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !129 -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !106 +// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !109 +// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !111 +// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !113 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !106 +// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !106 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !107 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !106 +// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !109 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !109 +// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !109 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !110 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !109 +// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !111 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !111 +// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !111 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !112 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !111 +// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !113 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !113 +// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !113 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !114 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z10pass_shorts.carbon_thunk._(ptr noundef %0) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !143 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !143 -// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !149 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !127 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !127 +// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !133 // CHECK:STDOUT: call void @_Z10pass_shorts(i16 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -305,10 +277,10 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !133 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !117 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !134 -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !118 +// CHECK:STDOUT: ret void, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_signedasil(i8 noundef signext, i16 noundef signext, i32 noundef, i64 noundef) #3 @@ -327,8 +299,8 @@ fn PassValueExpr(y: Cpp.Y) { // 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.dbg.cu = !{!33} -// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!154} +// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!138} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -363,85 +335,69 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) // CHECK:STDOUT: !71 = !DILocation(line: 7, column: 22, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !76) // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37) // CHECK:STDOUT: !75 = !DILocation(line: 7, column: 22, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !32, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !37) -// CHECK:STDOUT: !79 = !DILocation(line: 7, column: 22, scope: !77) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !36) +// CHECK:STDOUT: !79 = !DILocation(line: 7, column: 19, scope: !77) // CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !84) // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !36) // CHECK:STDOUT: !83 = !DILocation(line: 7, column: 19, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !36) -// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 19, scope: !85) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !88) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !39) +// CHECK:STDOUT: !87 = !DILocation(line: 9, column: 24, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !32, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !36) -// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 19, scope: !89) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !92) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !39) +// CHECK:STDOUT: !91 = !DILocation(line: 9, column: 24, scope: !89) // CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !39) -// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 24, scope: !93) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !96) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !8) +// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 21, scope: !93) // CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !39) -// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 24, scope: !97) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !8) +// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 21, scope: !97) // CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !32, line: 9, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !39) -// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 24, scope: !101) -// CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !108) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !8) -// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 21, scope: !105) -// CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !8) -// CHECK:STDOUT: !111 = !DILocation(line: 9, column: 21, scope: !109) -// CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !32, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !116) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !8) -// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 21, scope: !113) -// CHECK:STDOUT: !116 = !{!114} -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !32, line: 16, type: !58, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !132) -// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !37) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 2, scope: !117, type: !42) -// CHECK:STDOUT: !122 = !DILocation(line: 17, column: 18, scope: !117) -// CHECK:STDOUT: !123 = !DILocation(line: 17, column: 3, scope: !117) -// CHECK:STDOUT: !125 = !DILocation(line: 18, column: 18, scope: !117) -// CHECK:STDOUT: !126 = !DILocation(line: 18, column: 3, scope: !117) -// CHECK:STDOUT: !127 = !DILocation(line: 19, column: 18, scope: !117) -// CHECK:STDOUT: !128 = !DILocation(line: 19, column: 3, scope: !117) -// CHECK:STDOUT: !129 = !DILocation(line: 20, column: 18, scope: !117) -// CHECK:STDOUT: !130 = !DILocation(line: 20, column: 3, scope: !117) -// CHECK:STDOUT: !131 = !DILocation(line: 16, column: 1, scope: !117) -// CHECK:STDOUT: !132 = !{!118, !119} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !32, type: !41, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !134 = !DILocation(line: 14, column: 1, scope: !133) -// CHECK:STDOUT: !135 = !DILocation(line: 0, scope: !133) -// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0} -// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0} -// CHECK:STDOUT: !139 = !{!"p1 omnipotent char", !138, i64 0} -// CHECK:STDOUT: !140 = !{!139, !139, i64 0} -// CHECK:STDOUT: !141 = !{!"short", !137, i64 0} -// CHECK:STDOUT: !142 = !{!"p1 short", !138, i64 0} -// CHECK:STDOUT: !143 = !{!142, !142, i64 0} -// CHECK:STDOUT: !144 = !{!"int", !137, i64 0} -// CHECK:STDOUT: !145 = !{!144, !144, i64 0} -// CHECK:STDOUT: !146 = !{!"long", !137, i64 0} -// CHECK:STDOUT: !147 = !{!146, !146, i64 0} -// CHECK:STDOUT: !148 = !{!137, !137, i64 0} -// CHECK:STDOUT: !149 = !{!141, !141, i64 0} -// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0} -// CHECK:STDOUT: !154 = !{!153, !144, i64 0} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !32, line: 16, type: !58, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !116) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 2, scope: !101, type: !42) +// CHECK:STDOUT: !106 = !DILocation(line: 17, column: 18, scope: !101) +// CHECK:STDOUT: !107 = !DILocation(line: 17, column: 3, scope: !101) +// CHECK:STDOUT: !109 = !DILocation(line: 18, column: 18, scope: !101) +// CHECK:STDOUT: !110 = !DILocation(line: 18, column: 3, scope: !101) +// CHECK:STDOUT: !111 = !DILocation(line: 19, column: 18, scope: !101) +// CHECK:STDOUT: !112 = !DILocation(line: 19, column: 3, scope: !101) +// CHECK:STDOUT: !113 = !DILocation(line: 20, column: 18, scope: !101) +// CHECK:STDOUT: !114 = !DILocation(line: 20, column: 3, scope: !101) +// CHECK:STDOUT: !115 = !DILocation(line: 16, column: 1, scope: !101) +// CHECK:STDOUT: !116 = !{!102, !103} +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !32, type: !41, spFlags: DISPFlagDefinition, unit: !33) +// CHECK:STDOUT: !118 = !DILocation(line: 14, column: 1, scope: !117) +// CHECK:STDOUT: !119 = !DILocation(line: 0, scope: !117) +// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0} +// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0} +// CHECK:STDOUT: !123 = !{!"p1 omnipotent char", !122, i64 0} +// CHECK:STDOUT: !124 = !{!123, !123, i64 0} +// CHECK:STDOUT: !125 = !{!"short", !121, i64 0} +// CHECK:STDOUT: !126 = !{!"p1 short", !122, i64 0} +// CHECK:STDOUT: !127 = !{!126, !126, i64 0} +// CHECK:STDOUT: !128 = !{!"int", !121, i64 0} +// CHECK:STDOUT: !129 = !{!128, !128, i64 0} +// CHECK:STDOUT: !130 = !{!"long", !121, i64 0} +// CHECK:STDOUT: !131 = !{!130, !130, i64 0} +// CHECK:STDOUT: !132 = !{!121, !121, i64 0} +// CHECK:STDOUT: !133 = !{!125, !125, i64 0} +// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0} +// CHECK:STDOUT: !138 = !{!137, !128, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_struct.carbon' @@ -452,36 +408,36 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %struct.X = type { i32, i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !159 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !160 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !160 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !160 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !162 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !162 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !163 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !163 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !164 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !164 -// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !166 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !160 -// CHECK:STDOUT: ret void, !dbg !167 +// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !144 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !144 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !144 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !146 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !146 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !147 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !147 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !148 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !148 +// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !150 +// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !144 +// CHECK:STDOUT: ret void, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN1XC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !181 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !181 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !165 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !165 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !169 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !170 +// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !154 +// CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -490,9 +446,9 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.X, align 4 // CHECK:STDOUT: %agg.tmp.coerce = alloca { i64, i32 }, align 4 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !181 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !181 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !183 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !165 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !165 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !167 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp.coerce, ptr align 4 %agg.tmp, i64 12, i1 false) // CHECK:STDOUT: %2 = getelementptr inbounds nuw { i64, i32 }, ptr %agg.tmp.coerce, i32 0, i32 0 // CHECK:STDOUT: %3 = load i64, ptr %2, align 4 @@ -503,18 +459,18 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !155 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !173 +// CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !175 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !178 -// CHECK:STDOUT: ret void, !dbg !179 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !159 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_struct1X(i64, i32) #5 @@ -532,9 +488,9 @@ 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.dbg.cu = !{!156} -// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!154} +// CHECK:STDOUT: !llvm.dbg.cu = !{!140} +// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!138} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -544,40 +500,40 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !59 = !{null, !42} // CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0} -// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0} -// CHECK:STDOUT: !144 = !{!"int", !137, i64 0} -// CHECK:STDOUT: !145 = !{!144, !144, i64 0} -// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0} -// CHECK:STDOUT: !154 = !{!153, !144, i64 0} -// CHECK:STDOUT: !155 = !DIFile(filename: "import_struct.carbon", directory: "") -// CHECK:STDOUT: !156 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !155, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !157 = !{!42} -// CHECK:STDOUT: !158 = !DISubroutineType(types: !157) -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !155, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !156) -// CHECK:STDOUT: !160 = !DILocation(line: 7, column: 3, scope: !159) -// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !159) -// CHECK:STDOUT: !163 = !DILocation(line: 9, column: 3, scope: !159) -// CHECK:STDOUT: !164 = !DILocation(line: 10, column: 3, scope: !159) -// CHECK:STDOUT: !166 = !DILocation(line: 11, column: 3, scope: !159) -// CHECK:STDOUT: !167 = !DILocation(line: 6, column: 1, scope: !159) -// CHECK:STDOUT: !168 = !DIFile(filename: "./struct.h", directory: "") -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !168, line: 2, type: !158, spFlags: DISPFlagDefinition, unit: !156) -// CHECK:STDOUT: !170 = !DILocation(line: 2, column: 8, scope: !169) -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !155, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !156, retainedNodes: !174) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !42) -// CHECK:STDOUT: !173 = !DILocation(line: 7, column: 3, scope: !171) -// CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !26, line: 9, type: !158, spFlags: DISPFlagDefinition, unit: !156) -// CHECK:STDOUT: !178 = !DILocation(line: 9, column: 28, scope: !175) -// CHECK:STDOUT: !179 = !DILocation(line: 9, column: 21, scope: !175) -// CHECK:STDOUT: !180 = !{!"p1 _ZTS1X", !138, i64 0} -// CHECK:STDOUT: !181 = !{!180, !180, i64 0} -// CHECK:STDOUT: !183 = !{i64 0, i64 4, !145, i64 4, i64 4, !145, i64 8, i64 4, !145} +// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0} +// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0} +// CHECK:STDOUT: !128 = !{!"int", !121, i64 0} +// CHECK:STDOUT: !129 = !{!128, !128, i64 0} +// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0} +// CHECK:STDOUT: !138 = !{!137, !128, i64 0} +// CHECK:STDOUT: !139 = !DIFile(filename: "import_struct.carbon", directory: "") +// CHECK:STDOUT: !140 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !139, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !141 = !{!42} +// CHECK:STDOUT: !142 = !DISubroutineType(types: !141) +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !139, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !140) +// CHECK:STDOUT: !144 = !DILocation(line: 7, column: 3, scope: !143) +// CHECK:STDOUT: !146 = !DILocation(line: 8, column: 3, scope: !143) +// CHECK:STDOUT: !147 = !DILocation(line: 9, column: 3, scope: !143) +// CHECK:STDOUT: !148 = !DILocation(line: 10, column: 3, scope: !143) +// CHECK:STDOUT: !150 = !DILocation(line: 11, column: 3, scope: !143) +// CHECK:STDOUT: !151 = !DILocation(line: 6, column: 1, scope: !143) +// CHECK:STDOUT: !152 = !DIFile(filename: "./struct.h", directory: "") +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !152, line: 2, type: !142, spFlags: DISPFlagDefinition, unit: !140) +// CHECK:STDOUT: !154 = !DILocation(line: 2, column: 8, scope: !153) +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !139, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !158) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !42) +// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !155) +// CHECK:STDOUT: !158 = !{!156} +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !26, line: 9, type: !142, spFlags: DISPFlagDefinition, unit: !140) +// CHECK:STDOUT: !162 = !DILocation(line: 9, column: 28, scope: !159) +// CHECK:STDOUT: !163 = !DILocation(line: 9, column: 21, scope: !159) +// CHECK:STDOUT: !164 = !{!"p1 _ZTS1X", !122, i64 0} +// CHECK:STDOUT: !165 = !{!164, !164, i64 0} +// CHECK:STDOUT: !167 = !{i64 0, i64 4, !129, i64 4, i64 4, !129, i64 8, i64 4, !129} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_class_with_nontrivial_copy.carbon' @@ -588,19 +544,19 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: %class.Y = type { i32, i32, i32 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !186 { +// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !187 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !187 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !189 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !189 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !190 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !190 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !191 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !191 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !187 -// CHECK:STDOUT: ret void, !dbg !194 +// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !171 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !171 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !173 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !173 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !174 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !174 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !175 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !175 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !177 +// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !171 +// CHECK:STDOUT: ret void, !dbg !178 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -608,37 +564,37 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.Y, align 4 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !211 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !211 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !195 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !195 // CHECK:STDOUT: call void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(12) %1) // CHECK:STDOUT: call void @_Z11pass_struct1Y(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(12) %agg.tmp) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !195 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %self) #0 !dbg !179 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: ret void, !dbg !181 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.Main(ptr sret([12 x i8])) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !199 { +// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !183 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !200 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !200 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !200 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !200 -// CHECK:STDOUT: ret void, !dbg !202 +// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !184 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !184 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !184 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !185 +// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !184 +// CHECK:STDOUT: ret void, !dbg !186 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !203 { +// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !187 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !207 -// CHECK:STDOUT: ret void, !dbg !208 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !191 +// CHECK:STDOUT: ret void, !dbg !192 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -656,9 +612,9 @@ 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.dbg.cu = !{!185} -// CHECK:STDOUT: !llvm.module.flags = !{!150, !151, !152, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!154} +// CHECK:STDOUT: !llvm.dbg.cu = !{!169} +// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!138} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -667,37 +623,37 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !59 = !{null, !42} // CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !136 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !137 = !{!"omnipotent char", !136, i64 0} -// CHECK:STDOUT: !138 = !{!"any pointer", !137, i64 0} -// CHECK:STDOUT: !144 = !{!"int", !137, i64 0} -// CHECK:STDOUT: !150 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !151 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !152 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !153 = !{!"__libc_errno", !144, i64 0} -// CHECK:STDOUT: !154 = !{!153, !144, i64 0} -// CHECK:STDOUT: !184 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") -// CHECK:STDOUT: !185 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !184, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !184, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !185) -// CHECK:STDOUT: !187 = !DILocation(line: 7, column: 3, scope: !186) -// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 3, scope: !186) -// CHECK:STDOUT: !190 = !DILocation(line: 9, column: 3, scope: !186) -// CHECK:STDOUT: !191 = !DILocation(line: 10, column: 3, scope: !186) -// CHECK:STDOUT: !193 = !DILocation(line: 11, column: 3, scope: !186) -// CHECK:STDOUT: !194 = !DILocation(line: 6, column: 1, scope: !186) -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !184, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !185, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !42) -// CHECK:STDOUT: !197 = !DILocation(line: 7, column: 3, scope: !195) -// CHECK:STDOUT: !198 = !{!196} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !184, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !185) -// CHECK:STDOUT: !200 = !DILocation(line: 17, column: 19, scope: !199) -// CHECK:STDOUT: !201 = !DILocation(line: 17, column: 3, scope: !199) -// CHECK:STDOUT: !202 = !DILocation(line: 16, column: 1, scope: !199) -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !184, line: 20, type: !60, spFlags: DISPFlagDefinition, unit: !185, retainedNodes: !209) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !42) -// CHECK:STDOUT: !207 = !DILocation(line: 21, column: 3, scope: !203) -// CHECK:STDOUT: !208 = !DILocation(line: 20, column: 1, scope: !203) -// CHECK:STDOUT: !209 = !{!204} -// CHECK:STDOUT: !210 = !{!"p1 _ZTS1Y", !138, i64 0} -// CHECK:STDOUT: !211 = !{!210, !210, i64 0} +// CHECK:STDOUT: !120 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !121 = !{!"omnipotent char", !120, i64 0} +// CHECK:STDOUT: !122 = !{!"any pointer", !121, i64 0} +// CHECK:STDOUT: !128 = !{!"int", !121, i64 0} +// CHECK:STDOUT: !134 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !135 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !136 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !137 = !{!"__libc_errno", !128, i64 0} +// CHECK:STDOUT: !138 = !{!137, !128, i64 0} +// CHECK:STDOUT: !168 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") +// CHECK:STDOUT: !169 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !168, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !168, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !169) +// CHECK:STDOUT: !171 = !DILocation(line: 7, column: 3, scope: !170) +// CHECK:STDOUT: !173 = !DILocation(line: 8, column: 3, scope: !170) +// CHECK:STDOUT: !174 = !DILocation(line: 9, column: 3, scope: !170) +// CHECK:STDOUT: !175 = !DILocation(line: 10, column: 3, scope: !170) +// CHECK:STDOUT: !177 = !DILocation(line: 11, column: 3, scope: !170) +// CHECK:STDOUT: !178 = !DILocation(line: 6, column: 1, scope: !170) +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !168, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !182) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !42) +// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 3, scope: !179) +// CHECK:STDOUT: !182 = !{!180} +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !168, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !169) +// CHECK:STDOUT: !184 = !DILocation(line: 17, column: 19, scope: !183) +// CHECK:STDOUT: !185 = !DILocation(line: 17, column: 3, scope: !183) +// CHECK:STDOUT: !186 = !DILocation(line: 16, column: 1, scope: !183) +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !168, line: 20, type: !60, spFlags: DISPFlagDefinition, unit: !169, retainedNodes: !193) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !42) +// CHECK:STDOUT: !191 = !DILocation(line: 21, column: 3, scope: !187) +// CHECK:STDOUT: !192 = !DILocation(line: 20, column: 1, scope: !187) +// CHECK:STDOUT: !193 = !{!188} +// CHECK:STDOUT: !194 = !{!"p1 _ZTS1Y", !122, i64 0} +// CHECK:STDOUT: !195 = !{!194, !194, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/import/return.carbon b/toolchain/lower/testdata/interop/cpp/function/import/return.carbon index 85ad83de157d..4d3ae097bfd8 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/return.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/return.carbon @@ -132,10 +132,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: define internal void @_Z8ReturnU8v.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !263 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !263 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !231 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !231 // CHECK:STDOUT: %call = call noundef zeroext i8 @_Z8ReturnU8v() -// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !264 +// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !232 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -153,10 +153,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: define internal void @_Z9ReturnU16v.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !235 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !235 // CHECK:STDOUT: %call = call noundef zeroext i16 @_Z9ReturnU16v() -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !268 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !236 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -192,10 +192,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: define internal void @_Z8ReturnI8v.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !263 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !263 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !231 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !231 // CHECK:STDOUT: %call = call noundef signext i8 @_Z8ReturnI8v() -// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !264 +// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !232 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,10 +213,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: define internal void @_Z9ReturnI16v.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !235 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !235 // CHECK:STDOUT: %call = call noundef signext i16 @_Z9ReturnI16v() -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !268 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !236 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -278,202 +278,146 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !132 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !132 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self) #0 !dbg !136 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !136 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core"(ptr %self), !dbg !138 // CHECK:STDOUT: ret void, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core"(ptr %self) #0 !dbg !140 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !140 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !144 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !148 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core"(ptr %self), !dbg !150 // CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.99892fadd247b492:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !152 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !156 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !156 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self) #0 !dbg !160 { +// CHECK:STDOUT: define void @_CVars.Main() #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core"(ptr %self), !dbg !162 -// CHECK:STDOUT: ret void, !dbg !162 +// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !161 +// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !164 +// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !167 +// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !170 +// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !173 +// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !176 +// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !179 +// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !182 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !161 +// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !162 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !164 +// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !165 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !167 +// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !168 +// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !167 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !170 +// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !171 +// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !170 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !173 +// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !174 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !176 +// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !177 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !179 +// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !180 +// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !179 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !182 +// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !183 +// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !182 +// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !185 +// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !186 +// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !187 +// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !188 +// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !189 +// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !190 +// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !191 +// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !192 +// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc43_7, i16 %.loc43_14, i32 %.loc43_22, i64 %.loc43_30, i8 %.loc43_38, i16 %.loc43_45, i32 %.loc43_53, i64 %.loc43_61), !dbg !193 +// CHECK:STDOUT: call void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %my_i64.var), !dbg !182 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %my_i32.var), !dbg !179 +// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %my_i16.var), !dbg !176 +// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %my_i8.var), !dbg !173 +// CHECK:STDOUT: call void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %my_u64.var), !dbg !170 +// CHECK:STDOUT: call void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %my_u32.var), !dbg !167 +// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %my_u16.var), !dbg !164 +// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %my_u8.var), !dbg !161 +// CHECK:STDOUT: ret void, !dbg !194 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core"(ptr %self) #0 !dbg !164 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !195 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: ret void, !dbg !197 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !168 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !199 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !170 +// CHECK:STDOUT: ret void, !dbg !201 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %self) #0 !dbg !172 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !203 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core"(ptr %self), !dbg !174 -// CHECK:STDOUT: ret void, !dbg !174 +// CHECK:STDOUT: ret void, !dbg !205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CVars.Main() #0 !dbg !176 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !207 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !177 -// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !180 -// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !183 -// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !186 -// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !189 -// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !192 -// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !195 -// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !198 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !177 -// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !178 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !180 -// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !181 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !183 -// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !184 -// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !183 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !186 -// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !187 -// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !186 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !189 -// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !192 -// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !195 -// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !196 -// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !195 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !198 -// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !199 -// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !198 -// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !201 -// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !202 -// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !203 -// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !204 -// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !205 -// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !206 -// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !207 -// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !208 -// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc43_7, i16 %.loc43_14, i32 %.loc43_22, i64 %.loc43_30, i8 %.loc43_38, i16 %.loc43_45, i32 %.loc43_53, i64 %.loc43_61), !dbg !209 -// CHECK:STDOUT: call void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %my_i64.var), !dbg !198 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %my_i32.var), !dbg !195 -// CHECK:STDOUT: call void @"_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core"(ptr %my_i16.var), !dbg !192 -// CHECK:STDOUT: call void @"_CSelfDestruct.4954785a8b134801:core.Destroy.Core"(ptr %my_i8.var), !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %my_u64.var), !dbg !186 -// CHECK:STDOUT: call void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %my_u32.var), !dbg !183 -// CHECK:STDOUT: call void @"_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core"(ptr %my_u16.var), !dbg !180 -// CHECK:STDOUT: call void @"_CSelfDestruct.be60742f00557eec:core.Destroy.Core"(ptr %my_u8.var), !dbg !177 -// CHECK:STDOUT: ret void, !dbg !210 +// CHECK:STDOUT: ret void, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core"(ptr %self) #0 !dbg !211 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core"(ptr %self), !dbg !221 // CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !223 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !225 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !227 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !229 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !231 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !233 -// CHECK:STDOUT: ret void, !dbg !233 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core"(ptr %self) #0 !dbg !235 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !237 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !239 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !241 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self) #0 !dbg !243 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core"(ptr %self), !dbg !245 -// CHECK:STDOUT: ret void, !dbg !245 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core"(ptr %self) #0 !dbg !247 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !249 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !251 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !253 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self) #0 !dbg !255 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core"(ptr %self), !dbg !257 -// CHECK:STDOUT: ret void, !dbg !257 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: @@ -494,8 +438,8 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!274} +// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!242} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -582,141 +526,109 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !11) // CHECK:STDOUT: !130 = !DILocation(line: 25, column: 21, scope: !128) // CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) // CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !11) // CHECK:STDOUT: !134 = !DILocation(line: 25, column: 21, scope: !132) // CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d57cb32fcf12ec07:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !11) -// CHECK:STDOUT: !138 = !DILocation(line: 25, column: 21, scope: !136) +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !10) +// CHECK:STDOUT: !138 = !DILocation(line: 24, column: 19, scope: !136) // CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4a4fcc00062c7f0:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) // CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !10) // CHECK:STDOUT: !142 = !DILocation(line: 24, column: 19, scope: !140) // CHECK:STDOUT: !143 = !{!141} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !10) -// CHECK:STDOUT: !146 = !DILocation(line: 24, column: 19, scope: !144) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !7) +// CHECK:STDOUT: !146 = !DILocation(line: 20, column: 21, scope: !144) // CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4954785a8b134801:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !10) -// CHECK:STDOUT: !150 = !DILocation(line: 24, column: 19, scope: !148) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !7) +// CHECK:STDOUT: !150 = !DILocation(line: 20, column: 21, scope: !148) // CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.99892fadd247b492:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !7) -// CHECK:STDOUT: !154 = !DILocation(line: 20, column: 21, scope: !152) +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !155) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !6) +// CHECK:STDOUT: !154 = !DILocation(line: 19, column: 19, scope: !152) // CHECK:STDOUT: !155 = !{!153} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !7) -// CHECK:STDOUT: !158 = !DILocation(line: 20, column: 21, scope: !156) +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !6) +// CHECK:STDOUT: !158 = !DILocation(line: 19, column: 19, scope: !156) // CHECK:STDOUT: !159 = !{!157} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc9e5dacf328f74:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !163) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !7) -// CHECK:STDOUT: !162 = !DILocation(line: 20, column: 21, scope: !160) -// CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.04514f1c5a56b0cb:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !167) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !6) -// CHECK:STDOUT: !166 = !DILocation(line: 19, column: 19, scope: !164) -// CHECK:STDOUT: !167 = !{!165} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !171) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !6) -// CHECK:STDOUT: !170 = !DILocation(line: 19, column: 19, scope: !168) -// CHECK:STDOUT: !171 = !{!169} -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.be60742f00557eec:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !175) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !6) -// CHECK:STDOUT: !174 = !DILocation(line: 19, column: 19, scope: !172) -// CHECK:STDOUT: !175 = !{!173} -// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !177 = !DILocation(line: 33, column: 3, scope: !176) -// CHECK:STDOUT: !178 = !DILocation(line: 33, column: 19, scope: !176) -// CHECK:STDOUT: !180 = !DILocation(line: 34, column: 3, scope: !176) -// CHECK:STDOUT: !181 = !DILocation(line: 34, column: 21, scope: !176) -// CHECK:STDOUT: !183 = !DILocation(line: 35, column: 3, scope: !176) -// CHECK:STDOUT: !184 = !DILocation(line: 35, column: 21, scope: !176) -// CHECK:STDOUT: !186 = !DILocation(line: 36, column: 3, scope: !176) -// CHECK:STDOUT: !187 = !DILocation(line: 36, column: 21, scope: !176) -// CHECK:STDOUT: !189 = !DILocation(line: 38, column: 3, scope: !176) -// CHECK:STDOUT: !190 = !DILocation(line: 38, column: 19, scope: !176) -// CHECK:STDOUT: !192 = !DILocation(line: 39, column: 3, scope: !176) -// CHECK:STDOUT: !193 = !DILocation(line: 39, column: 21, scope: !176) -// CHECK:STDOUT: !195 = !DILocation(line: 40, column: 3, scope: !176) -// CHECK:STDOUT: !196 = !DILocation(line: 40, column: 21, scope: !176) -// CHECK:STDOUT: !198 = !DILocation(line: 41, column: 3, scope: !176) -// CHECK:STDOUT: !199 = !DILocation(line: 41, column: 21, scope: !176) -// CHECK:STDOUT: !201 = !DILocation(line: 43, column: 7, scope: !176) -// CHECK:STDOUT: !202 = !DILocation(line: 43, column: 14, scope: !176) -// CHECK:STDOUT: !203 = !DILocation(line: 43, column: 22, scope: !176) -// CHECK:STDOUT: !204 = !DILocation(line: 43, column: 30, scope: !176) -// CHECK:STDOUT: !205 = !DILocation(line: 43, column: 38, scope: !176) -// CHECK:STDOUT: !206 = !DILocation(line: 43, column: 45, scope: !176) -// CHECK:STDOUT: !207 = !DILocation(line: 43, column: 53, scope: !176) -// CHECK:STDOUT: !208 = !DILocation(line: 43, column: 61, scope: !176) -// CHECK:STDOUT: !209 = !DILocation(line: 43, column: 3, scope: !176) -// CHECK:STDOUT: !210 = !DILocation(line: 32, column: 1, scope: !176) -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !13) -// CHECK:STDOUT: !213 = !DILocation(line: 41, column: 3, scope: !211) +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !161 = !DILocation(line: 33, column: 3, scope: !160) +// CHECK:STDOUT: !162 = !DILocation(line: 33, column: 19, scope: !160) +// CHECK:STDOUT: !164 = !DILocation(line: 34, column: 3, scope: !160) +// CHECK:STDOUT: !165 = !DILocation(line: 34, column: 21, scope: !160) +// CHECK:STDOUT: !167 = !DILocation(line: 35, column: 3, scope: !160) +// CHECK:STDOUT: !168 = !DILocation(line: 35, column: 21, scope: !160) +// CHECK:STDOUT: !170 = !DILocation(line: 36, column: 3, scope: !160) +// CHECK:STDOUT: !171 = !DILocation(line: 36, column: 21, scope: !160) +// CHECK:STDOUT: !173 = !DILocation(line: 38, column: 3, scope: !160) +// CHECK:STDOUT: !174 = !DILocation(line: 38, column: 19, scope: !160) +// CHECK:STDOUT: !176 = !DILocation(line: 39, column: 3, scope: !160) +// CHECK:STDOUT: !177 = !DILocation(line: 39, column: 21, scope: !160) +// CHECK:STDOUT: !179 = !DILocation(line: 40, column: 3, scope: !160) +// CHECK:STDOUT: !180 = !DILocation(line: 40, column: 21, scope: !160) +// CHECK:STDOUT: !182 = !DILocation(line: 41, column: 3, scope: !160) +// CHECK:STDOUT: !183 = !DILocation(line: 41, column: 21, scope: !160) +// CHECK:STDOUT: !185 = !DILocation(line: 43, column: 7, scope: !160) +// CHECK:STDOUT: !186 = !DILocation(line: 43, column: 14, scope: !160) +// CHECK:STDOUT: !187 = !DILocation(line: 43, column: 22, scope: !160) +// CHECK:STDOUT: !188 = !DILocation(line: 43, column: 30, scope: !160) +// CHECK:STDOUT: !189 = !DILocation(line: 43, column: 38, scope: !160) +// CHECK:STDOUT: !190 = !DILocation(line: 43, column: 45, scope: !160) +// CHECK:STDOUT: !191 = !DILocation(line: 43, column: 53, scope: !160) +// CHECK:STDOUT: !192 = !DILocation(line: 43, column: 61, scope: !160) +// CHECK:STDOUT: !193 = !DILocation(line: 43, column: 3, scope: !160) +// CHECK:STDOUT: !194 = !DILocation(line: 32, column: 1, scope: !160) +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6e5a4ef51c9e705a:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !198) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !13) +// CHECK:STDOUT: !197 = !DILocation(line: 41, column: 3, scope: !195) +// CHECK:STDOUT: !198 = !{!196} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !13) +// CHECK:STDOUT: !201 = !DILocation(line: 41, column: 3, scope: !199) +// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !206) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !12) +// CHECK:STDOUT: !205 = !DILocation(line: 40, column: 3, scope: !203) +// CHECK:STDOUT: !206 = !{!204} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !210) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !12) +// CHECK:STDOUT: !209 = !DILocation(line: 40, column: 3, scope: !207) +// CHECK:STDOUT: !210 = !{!208} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !9) +// CHECK:STDOUT: !213 = !DILocation(line: 36, column: 3, scope: !211) // CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !13) -// CHECK:STDOUT: !217 = !DILocation(line: 41, column: 3, scope: !215) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !218) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !9) +// CHECK:STDOUT: !217 = !DILocation(line: 36, column: 3, scope: !215) // CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5aacfd7dcc330b17:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !13) -// CHECK:STDOUT: !221 = !DILocation(line: 41, column: 3, scope: !219) +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !222) +// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !8) +// CHECK:STDOUT: !221 = !DILocation(line: 35, column: 3, scope: !219) // CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !226) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !12) -// CHECK:STDOUT: !225 = !DILocation(line: 40, column: 3, scope: !223) +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !226) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !8) +// CHECK:STDOUT: !225 = !DILocation(line: 35, column: 3, scope: !223) // CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !230) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !12) -// CHECK:STDOUT: !229 = !DILocation(line: 40, column: 3, scope: !227) -// CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !234) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !12) -// CHECK:STDOUT: !233 = !DILocation(line: 40, column: 3, scope: !231) -// CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b8c1354df43b20:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !238) -// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !9) -// CHECK:STDOUT: !237 = !DILocation(line: 36, column: 3, scope: !235) -// CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !242) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !9) -// CHECK:STDOUT: !241 = !DILocation(line: 36, column: 3, scope: !239) -// CHECK:STDOUT: !242 = !{!240} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.18a2a1ac0d16cf80:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !246) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !9) -// CHECK:STDOUT: !245 = !DILocation(line: 36, column: 3, scope: !243) -// CHECK:STDOUT: !246 = !{!244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b18ca5df050aa3af:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !250) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !8) -// CHECK:STDOUT: !249 = !DILocation(line: 35, column: 3, scope: !247) -// CHECK:STDOUT: !250 = !{!248} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !254) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !8) -// CHECK:STDOUT: !253 = !DILocation(line: 35, column: 3, scope: !251) -// CHECK:STDOUT: !254 = !{!252} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ea3ccedbd6a1c75d:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !258) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !8) -// CHECK:STDOUT: !257 = !DILocation(line: 35, column: 3, scope: !255) -// CHECK:STDOUT: !258 = !{!256} -// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0} -// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0} -// CHECK:STDOUT: !262 = !{!"p1 omnipotent char", !261, i64 0} -// CHECK:STDOUT: !263 = !{!262, !262, i64 0} -// CHECK:STDOUT: !264 = !{!260, !260, i64 0} -// CHECK:STDOUT: !265 = !{!"short", !260, i64 0} -// CHECK:STDOUT: !266 = !{!"p1 short", !261, i64 0} -// CHECK:STDOUT: !267 = !{!266, !266, i64 0} -// CHECK:STDOUT: !268 = !{!265, !265, i64 0} -// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !272 = !{!"int", !260, i64 0} -// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0} -// CHECK:STDOUT: !274 = !{!273, !272, i64 0} +// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0} +// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0} +// CHECK:STDOUT: !230 = !{!"p1 omnipotent char", !229, i64 0} +// CHECK:STDOUT: !231 = !{!230, !230, i64 0} +// CHECK:STDOUT: !232 = !{!228, !228, i64 0} +// CHECK:STDOUT: !233 = !{!"short", !228, i64 0} +// CHECK:STDOUT: !234 = !{!"p1 short", !229, i64 0} +// CHECK:STDOUT: !235 = !{!234, !234, i64 0} +// CHECK:STDOUT: !236 = !{!233, !233, i64 0} +// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !240 = !{!"int", !228, i64 0} +// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0} +// CHECK:STDOUT: !242 = !{!241, !240, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_class.carbon' @@ -727,50 +639,50 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: %struct.X = type { ptr, ptr } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CGetX.Main(ptr sret([16 x i8]) %return) #0 !dbg !279 { +// CHECK:STDOUT: define void @_CGetX.Main(ptr sret([16 x i8]) %return) #0 !dbg !247 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !282 -// CHECK:STDOUT: ret void, !dbg !283 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !250 +// CHECK:STDOUT: ret void, !dbg !251 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z4Makev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !299 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !299 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !267 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !267 // CHECK:STDOUT: call void @_Z4Makev(ptr dead_on_unwind writable sret(%struct.X) align 8 %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CLet.Main() #0 !dbg !284 { +// CHECK:STDOUT: define void @_CLet.Main() #0 !dbg !252 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !285 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !285 -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !285 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc9_27.1.temp), !dbg !285 -// CHECK:STDOUT: ret void, !dbg !288 +// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !253 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !253 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !253 +// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc9_27.1.temp), !dbg !253 +// CHECK:STDOUT: ret void, !dbg !256 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN1XD1Ev(ptr noundef nonnull align 8 dead_on_return(16) dereferenceable(16)) unnamed_addr #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !289 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !257 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %self), !dbg !291 -// CHECK:STDOUT: ret void, !dbg !291 +// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %self), !dbg !259 +// CHECK:STDOUT: ret void, !dbg !259 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !293 { +// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !261 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !294 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !294 -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !295 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %_.var), !dbg !294 -// CHECK:STDOUT: ret void, !dbg !297 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !262 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !262 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !263 +// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %_.var), !dbg !262 +// CHECK:STDOUT: ret void, !dbg !265 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -787,9 +699,9 @@ 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.dbg.cu = !{!276} -// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!274} +// CHECK:STDOUT: !llvm.dbg.cu = !{!244} +// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!242} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -798,35 +710,35 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !18 = !DISubroutineType(types: !17) // CHECK:STDOUT: !35 = !{null} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0} -// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0} -// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !272 = !{!"int", !260, i64 0} -// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0} -// CHECK:STDOUT: !274 = !{!273, !272, i64 0} -// CHECK:STDOUT: !275 = !DIFile(filename: "import_class.carbon", directory: "") -// CHECK:STDOUT: !276 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !275, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !277 = !{!16} -// CHECK:STDOUT: !278 = !DISubroutineType(types: !277) -// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !275, line: 6, type: !278, spFlags: DISPFlagDefinition, unit: !276) -// CHECK:STDOUT: !282 = !DILocation(line: 6, column: 29, scope: !279) -// CHECK:STDOUT: !283 = !DILocation(line: 6, column: 22, scope: !279) -// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !275, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !276) -// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 18, scope: !284) -// CHECK:STDOUT: !288 = !DILocation(line: 8, column: 1, scope: !284) -// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !275, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !276, retainedNodes: !292) -// CHECK:STDOUT: !290 = !DILocalVariable(arg: 1, scope: !289, type: !16) -// CHECK:STDOUT: !291 = !DILocation(line: 9, column: 18, scope: !289) -// CHECK:STDOUT: !292 = !{!290} -// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !275, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !276) -// CHECK:STDOUT: !294 = !DILocation(line: 13, column: 3, scope: !293) -// CHECK:STDOUT: !295 = !DILocation(line: 13, column: 18, scope: !293) -// CHECK:STDOUT: !297 = !DILocation(line: 12, column: 1, scope: !293) -// CHECK:STDOUT: !298 = !{!"p1 _ZTS1X", !261, i64 0} -// CHECK:STDOUT: !299 = !{!298, !298, i64 0} +// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0} +// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0} +// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !240 = !{!"int", !228, i64 0} +// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0} +// CHECK:STDOUT: !242 = !{!241, !240, i64 0} +// CHECK:STDOUT: !243 = !DIFile(filename: "import_class.carbon", directory: "") +// CHECK:STDOUT: !244 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !243, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !245 = !{!16} +// CHECK:STDOUT: !246 = !DISubroutineType(types: !245) +// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !243, line: 6, type: !246, spFlags: DISPFlagDefinition, unit: !244) +// CHECK:STDOUT: !250 = !DILocation(line: 6, column: 29, scope: !247) +// CHECK:STDOUT: !251 = !DILocation(line: 6, column: 22, scope: !247) +// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !243, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !244) +// CHECK:STDOUT: !253 = !DILocation(line: 9, column: 18, scope: !252) +// CHECK:STDOUT: !256 = !DILocation(line: 8, column: 1, scope: !252) +// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !243, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !260) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !16) +// CHECK:STDOUT: !259 = !DILocation(line: 9, column: 18, scope: !257) +// CHECK:STDOUT: !260 = !{!258} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !243, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !244) +// CHECK:STDOUT: !262 = !DILocation(line: 13, column: 3, scope: !261) +// CHECK:STDOUT: !263 = !DILocation(line: 13, column: 18, scope: !261) +// CHECK:STDOUT: !265 = !DILocation(line: 12, column: 1, scope: !261) +// CHECK:STDOUT: !266 = !{!"p1 _ZTS1X", !229, i64 0} +// CHECK:STDOUT: !267 = !{!266, !266, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_return_with_args.carbon' @@ -838,10 +750,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: %class.C = type { i8 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %x) #0 !dbg !307 { +// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %x) #0 !dbg !275 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !313 -// CHECK:STDOUT: ret void, !dbg !314 +// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !281 +// CHECK:STDOUT: ret void, !dbg !282 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -851,10 +763,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.D, align 1 // CHECK:STDOUT: %undef.agg.tmp = alloca %class.C, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !317 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !319 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !319 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !317 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !285 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !287 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !287 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !285 // CHECK:STDOUT: call void @_Z1f1D() // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -865,33 +777,33 @@ 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.dbg.cu = !{!302} -// CHECK:STDOUT: !llvm.module.flags = !{!269, !270, !271, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!274} +// CHECK:STDOUT: !llvm.dbg.cu = !{!270} +// CHECK:STDOUT: !llvm.module.flags = !{!237, !238, !239, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!242} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !259 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !260 = !{!"omnipotent char", !259, i64 0} -// CHECK:STDOUT: !261 = !{!"any pointer", !260, i64 0} -// CHECK:STDOUT: !269 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !270 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !271 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !272 = !{!"int", !260, i64 0} -// CHECK:STDOUT: !273 = !{!"__libc_errno", !272, i64 0} -// CHECK:STDOUT: !274 = !{!273, !272, i64 0} -// CHECK:STDOUT: !301 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "") -// CHECK:STDOUT: !302 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !301, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !303 = !{!16, !16} -// CHECK:STDOUT: !304 = !DISubroutineType(types: !303) -// CHECK:STDOUT: !307 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !301, line: 10, type: !304, spFlags: DISPFlagDefinition, unit: !302, retainedNodes: !315) -// CHECK:STDOUT: !308 = !DILocalVariable(arg: 1, scope: !307, type: !16) -// CHECK:STDOUT: !313 = !DILocation(line: 11, column: 10, scope: !307) -// CHECK:STDOUT: !314 = !DILocation(line: 11, column: 3, scope: !307) -// CHECK:STDOUT: !315 = !{!308} -// CHECK:STDOUT: !316 = !{!"p1 _ZTS1D", !261, i64 0} -// CHECK:STDOUT: !317 = !{!316, !316, i64 0} -// CHECK:STDOUT: !318 = !{!"p1 _ZTS1C", !261, i64 0} -// CHECK:STDOUT: !319 = !{!318, !318, i64 0} +// CHECK:STDOUT: !227 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !228 = !{!"omnipotent char", !227, i64 0} +// CHECK:STDOUT: !229 = !{!"any pointer", !228, i64 0} +// CHECK:STDOUT: !237 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !238 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !239 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !240 = !{!"int", !228, i64 0} +// CHECK:STDOUT: !241 = !{!"__libc_errno", !240, i64 0} +// CHECK:STDOUT: !242 = !{!241, !240, i64 0} +// CHECK:STDOUT: !269 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "") +// CHECK:STDOUT: !270 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !269, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !271 = !{!16, !16} +// CHECK:STDOUT: !272 = !DISubroutineType(types: !271) +// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !269, line: 10, type: !272, spFlags: DISPFlagDefinition, unit: !270, retainedNodes: !283) +// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !16) +// CHECK:STDOUT: !281 = !DILocation(line: 11, column: 10, scope: !275) +// CHECK:STDOUT: !282 = !DILocation(line: 11, column: 3, scope: !275) +// CHECK:STDOUT: !283 = !{!276} +// CHECK:STDOUT: !284 = !{!"p1 _ZTS1D", !229, i64 0} +// CHECK:STDOUT: !285 = !{!284, !284, i64 0} +// CHECK:STDOUT: !286 = !{!"p1 _ZTS1C", !229, i64 0} +// CHECK:STDOUT: !287 = !{!286, !286, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/issue7142.carbon b/toolchain/lower/testdata/interop/cpp/issue7142.carbon index 20a5a700cf20..36f275679a14 100644 --- a/toolchain/lower/testdata/interop/cpp/issue7142.carbon +++ b/toolchain/lower/testdata/interop/cpp/issue7142.carbon @@ -49,7 +49,7 @@ void f() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %call = call noundef ptr @_ZN6CarbonL3GetEv() // CHECK:STDOUT: %price = getelementptr inbounds nuw %"class.Carbon::A", ptr %call, i32 0, i32 0 -// CHECK:STDOUT: %0 = load i32, ptr %price, align 4, !tbaa !54 +// CHECK:STDOUT: %0 = load i32, ptr %price, align 4, !tbaa !50 // CHECK:STDOUT: ret i32 %0 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -77,44 +77,37 @@ void f() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !26 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !26 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #1 !dbg !30 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core"(ptr %self) #1 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !32 // CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core"(ptr %self) #1 !dbg !34 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a58e9b74ce410031:core.Destroy.Core"(ptr %self) #1 !dbg !34 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core"(ptr %self), !dbg !36 // CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a58e9b74ce410031:core.Destroy.Core"(ptr %self) #1 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core"(ptr %self), !dbg !40 // CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !42 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !44 // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal noundef ptr @_ZN6CarbonL3GetEv() #3 { // CHECK:STDOUT: entry: @@ -130,8 +123,8 @@ void f() { // 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.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.module.flags = !{!53, !54, !55, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -155,38 +148,34 @@ void f() { // CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !22, type: !6) // CHECK:STDOUT: !24 = !DILocation(line: 15, column: 1, scope: !22) // CHECK:STDOUT: !25 = !{!23} -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !6) // CHECK:STDOUT: !28 = !DILocation(line: 15, column: 1, scope: !26) // CHECK:STDOUT: !29 = !{!27} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !6) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !7) // CHECK:STDOUT: !32 = !DILocation(line: 15, column: 1, scope: !30) // CHECK:STDOUT: !33 = !{!31} -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a58e9b74ce410031:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a58e9b74ce410031:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !34) // CHECK:STDOUT: !37 = !{!35} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a58e9b74ce410031:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !7) // CHECK:STDOUT: !40 = !DILocation(line: 15, column: 1, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !7) // CHECK:STDOUT: !44 = !DILocation(line: 15, column: 1, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !7) -// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 1, scope: !46) -// CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !51 = !{!"omnipotent char", !50, i64 0} -// CHECK:STDOUT: !52 = !{!"int", !51, i64 0} -// CHECK:STDOUT: !53 = !{!"_ZTSN6Carbon1AE", !52, i64 0} -// CHECK:STDOUT: !54 = !{!53, !52, i64 0} -// CHECK:STDOUT: !57 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !58 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !59 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !60 = !{!"__libc_errno", !52, i64 0} -// CHECK:STDOUT: !61 = !{!60, !52, i64 0} +// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !47, i64 0} +// CHECK:STDOUT: !49 = !{!"_ZTSN6Carbon1AE", !48, i64 0} +// CHECK:STDOUT: !50 = !{!49, !48, i64 0} +// CHECK:STDOUT: !53 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !54 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !55 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !56 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !57 = !{!56, !48, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/nullptr.carbon b/toolchain/lower/testdata/interop/cpp/nullptr.carbon index f54763f5c7f9..c45c2a3cae5d 100644 --- a/toolchain/lower/testdata/interop/cpp/nullptr.carbon +++ b/toolchain/lower/testdata/interop/cpp/nullptr.carbon @@ -98,37 +98,23 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.729fca203337f92a:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.729fca203337f92a:core.Destroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.729fca203337f92a:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5b309895020f658e:core.Destroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.729fca203337f92a:core.Destroy.Core"(ptr %self), !dbg !41 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5b309895020f658e:core.Destroy.Core"(ptr %self) #0 !dbg !43 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !45 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5b309895020f658e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5b309895020f658e:core.Destroy.Core"(ptr %self), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z11TakeNullptrDn.carbon_thunk._(ptr noundef %n) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %n.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %n, ptr %n.addr, align 8, !tbaa !124 -// CHECK:STDOUT: %0 = load ptr, ptr %n.addr, align 8, !tbaa !124 +// CHECK:STDOUT: store ptr %n, ptr %n.addr, align 8, !tbaa !108 +// CHECK:STDOUT: %0 = load ptr, ptr %n.addr, align 8, !tbaa !108 // CHECK:STDOUT: call void @_Z11TakeNullptrDn(ptr null) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -136,110 +122,96 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: declare ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !51 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core"(ptr %self), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core"(ptr %self), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define ptr @_CReturnNullptr.Main() #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !62 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define ptr @_CReturnNullptrCopy.Main() #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !67 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !67 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !68 +// CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22, ptr %a.var, align 8, !dbg !67 +// CHECK:STDOUT: %.loc23 = load ptr, ptr %a.var, align 8, !dbg !70 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr %.loc23), !dbg !70 +// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !67 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.826ebaace97974ae:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrIndirectly.Main() #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.826ebaace97974ae:core.Destroy.Core"(ptr %self), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !73 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnNullptr.Main() #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !78 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call, !dbg !79 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnNullptrCopy.Main() #0 !dbg !80 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !83 -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !84 -// CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22, ptr %a.var, align 8, !dbg !83 -// CHECK:STDOUT: %.loc23 = load ptr, ptr %a.var, align 8, !dbg !86 -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr %.loc23), !dbg !86 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !83 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23, !dbg !87 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrIndirectly.Main() #0 !dbg !88 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !91 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !91 -// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %a.var), !dbg !92 -// CHECK:STDOUT: %.loc28_10 = load ptr, ptr %a.var, align 8, !dbg !94 -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %.loc28_10), !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !91 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !95 +// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !75 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !75 +// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %a.var), !dbg !76 +// CHECK:STDOUT: %.loc28_10 = load ptr, ptr %a.var, align 8, !dbg !78 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %.loc28_10), !dbg !79 +// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !75 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z13ReturnNullptrv.carbon_thunk.(ptr noundef %return) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !124 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !124 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !108 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !108 // CHECK:STDOUT: %call = call ptr @_Z13ReturnNullptrv() -// CHECK:STDOUT: store ptr %call, ptr %0, align 8, !tbaa !125 +// CHECK:STDOUT: store ptr %call, ptr %0, align 8, !tbaa !109 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrDirectly.Main() #0 !dbg !96 { +// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrDirectly.Main() #0 !dbg !80 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc32_28.1.temp = alloca ptr, align 8, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_28.1.temp), !dbg !99 -// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %.loc32_28.1.temp), !dbg !99 -// CHECK:STDOUT: %.loc32_28.4 = load ptr, ptr %.loc32_28.1.temp, align 8, !dbg !99 -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %.loc32_28.4), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %.loc32_28.1.temp), !dbg !99 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !100 +// CHECK:STDOUT: %.loc32_28.1.temp = alloca ptr, align 8, !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_28.1.temp), !dbg !83 +// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %.loc32_28.1.temp), !dbg !83 +// CHECK:STDOUT: %.loc32_28.4 = load ptr, ptr %.loc32_28.1.temp, align 8, !dbg !83 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %.loc32_28.4), !dbg !84 +// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %.loc32_28.1.temp), !dbg !83 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CConvertNullptrConstant.Main() #0 !dbg !101 { +// CHECK:STDOUT: define ptr @_CConvertNullptrConstant.Main() #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr poison), !dbg !104 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !104 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr poison), !dbg !88 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %self) #0 !dbg !106 { -// CHECK:STDOUT: %1 = call ptr @_CNone.Optional.Core.6e9e957697159b53(), !dbg !111 -// CHECK:STDOUT: ret ptr %1, !dbg !112 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: %1 = call ptr @_CNone.Optional.Core.6e9e957697159b53(), !dbg !95 +// CHECK:STDOUT: ret ptr %1, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -248,8 +220,8 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: declare ptr @_CMake.NullptrT.CppCompat.Core() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.6e9e957697159b53() #0 !dbg !114 { -// CHECK:STDOUT: ret ptr null, !dbg !118 +// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.6e9e957697159b53() #0 !dbg !98 { +// CHECK:STDOUT: ret ptr null, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11TakeNullptrDn(ptr) #1 @@ -266,8 +238,8 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!126, !127, !128, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!131} +// CHECK:STDOUT: !llvm.module.flags = !{!110, !111, !112, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!115} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -301,83 +273,67 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !9) // CHECK:STDOUT: !33 = !DILocation(line: 12, column: 15, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.729fca203337f92a:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.729fca203337f92a:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !9) // CHECK:STDOUT: !37 = !DILocation(line: 12, column: 15, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.729fca203337f92a:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5b309895020f658e:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !9) // CHECK:STDOUT: !41 = !DILocation(line: 12, column: 15, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5b309895020f658e:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !9) -// CHECK:STDOUT: !45 = !DILocation(line: 12, column: 15, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 19, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5b309895020f658e:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !9) -// CHECK:STDOUT: !49 = !DILocation(line: 12, column: 15, scope: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 14, column: 19, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !9) // CHECK:STDOUT: !53 = !DILocation(line: 14, column: 19, scope: !51) // CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.826ebaace97974ae:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !9) // CHECK:STDOUT: !57 = !DILocation(line: 14, column: 19, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !9) -// CHECK:STDOUT: !61 = !DILocation(line: 14, column: 19, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !9) -// CHECK:STDOUT: !65 = !DILocation(line: 14, column: 19, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.826ebaace97974ae:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !9) -// CHECK:STDOUT: !69 = !DILocation(line: 14, column: 19, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.826ebaace97974ae:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !9) -// CHECK:STDOUT: !73 = !DILocation(line: 14, column: 19, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !4, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !78 = !DILocation(line: 18, column: 10, scope: !75) -// CHECK:STDOUT: !79 = !DILocation(line: 18, column: 3, scope: !75) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !4, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !83 = !DILocation(line: 22, column: 3, scope: !80) -// CHECK:STDOUT: !84 = !DILocation(line: 22, column: 26, scope: !80) -// CHECK:STDOUT: !86 = !DILocation(line: 23, column: 10, scope: !80) -// CHECK:STDOUT: !87 = !DILocation(line: 23, column: 3, scope: !80) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !4, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !91 = !DILocation(line: 27, column: 3, scope: !88) -// CHECK:STDOUT: !92 = !DILocation(line: 27, column: 26, scope: !88) -// CHECK:STDOUT: !94 = !DILocation(line: 28, column: 10, scope: !88) -// CHECK:STDOUT: !95 = !DILocation(line: 28, column: 3, scope: !88) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !4, line: 31, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !99 = !DILocation(line: 32, column: 10, scope: !96) -// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 3, scope: !96) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !4, line: 35, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !104 = !DILocation(line: 36, column: 3, scope: !101) -// CHECK:STDOUT: !105 = !DIFile(filename: "{{.*}}/prelude/types/cpp/nullptr.carbon", directory: "") -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba", scope: null, file: !105, line: 51, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !113) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !9) -// CHECK:STDOUT: !111 = !DILocation(line: 52, column: 14, scope: !106) -// CHECK:STDOUT: !112 = !DILocation(line: 52, column: 7, scope: !106) -// CHECK:STDOUT: !113 = !{!107} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.6e9e957697159b53", scope: null, file: !22, line: 30, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !118 = !DILocation(line: 31, column: 5, scope: !114) -// CHECK:STDOUT: !119 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !120 = !{!"omnipotent char", !119, i64 0} -// CHECK:STDOUT: !121 = !{!"std::nullptr_t", !120, i64 0} -// CHECK:STDOUT: !122 = !{!"any pointer", !120, i64 0} -// CHECK:STDOUT: !123 = !{!"p1 std::nullptr_t", !122, i64 0} -// CHECK:STDOUT: !124 = !{!123, !123, i64 0} -// CHECK:STDOUT: !125 = !{!121, !121, i64 0} -// CHECK:STDOUT: !126 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !127 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !128 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !129 = !{!"int", !120, i64 0} -// CHECK:STDOUT: !130 = !{!"__libc_errno", !129, i64 0} -// CHECK:STDOUT: !131 = !{!130, !129, i64 0} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !4, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !62 = !DILocation(line: 18, column: 10, scope: !59) +// CHECK:STDOUT: !63 = !DILocation(line: 18, column: 3, scope: !59) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !4, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !67 = !DILocation(line: 22, column: 3, scope: !64) +// CHECK:STDOUT: !68 = !DILocation(line: 22, column: 26, scope: !64) +// CHECK:STDOUT: !70 = !DILocation(line: 23, column: 10, scope: !64) +// CHECK:STDOUT: !71 = !DILocation(line: 23, column: 3, scope: !64) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !4, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !75 = !DILocation(line: 27, column: 3, scope: !72) +// CHECK:STDOUT: !76 = !DILocation(line: 27, column: 26, scope: !72) +// CHECK:STDOUT: !78 = !DILocation(line: 28, column: 10, scope: !72) +// CHECK:STDOUT: !79 = !DILocation(line: 28, column: 3, scope: !72) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !4, line: 31, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !83 = !DILocation(line: 32, column: 10, scope: !80) +// CHECK:STDOUT: !84 = !DILocation(line: 32, column: 3, scope: !80) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !4, line: 35, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !88 = !DILocation(line: 36, column: 3, scope: !85) +// CHECK:STDOUT: !89 = !DIFile(filename: "{{.*}}/prelude/types/cpp/nullptr.carbon", directory: "") +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.49279a15ecfc119b.Core.84588f41d61dafba", scope: null, file: !89, line: 51, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !97) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !9) +// CHECK:STDOUT: !95 = !DILocation(line: 52, column: 14, scope: !90) +// CHECK:STDOUT: !96 = !DILocation(line: 52, column: 7, scope: !90) +// CHECK:STDOUT: !97 = !{!91} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.6e9e957697159b53", scope: null, file: !22, line: 30, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !102 = !DILocation(line: 31, column: 5, scope: !98) +// CHECK:STDOUT: !103 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !104 = !{!"omnipotent char", !103, i64 0} +// CHECK:STDOUT: !105 = !{!"std::nullptr_t", !104, i64 0} +// CHECK:STDOUT: !106 = !{!"any pointer", !104, i64 0} +// CHECK:STDOUT: !107 = !{!"p1 std::nullptr_t", !106, i64 0} +// CHECK:STDOUT: !108 = !{!107, !107, i64 0} +// CHECK:STDOUT: !109 = !{!105, !105, i64 0} +// CHECK:STDOUT: !110 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !111 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !112 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !113 = !{!"int", !104, i64 0} +// CHECK:STDOUT: !114 = !{!"__libc_errno", !113, i64 0} +// CHECK:STDOUT: !115 = !{!114, !113, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/pointer.carbon b/toolchain/lower/testdata/interop/cpp/pointer.carbon index f546129f9bf1..36b3e430b90b 100644 --- a/toolchain/lower/testdata/interop/cpp/pointer.carbon +++ b/toolchain/lower/testdata/interop/cpp/pointer.carbon @@ -255,74 +255,60 @@ fn Convert() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5cf0c9a25f98a429:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5cf0c9a25f98a429:core.Destroy.Core"(ptr %self), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.574ea10b2e6709a0:core.Destroy.Core"(ptr %self) #0 !dbg !83 { +// CHECK:STDOUT: define ptr @_CReturnPtr.Main() #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !85 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core"(ptr %self) #0 !dbg !87 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.574ea10b2e6709a0:core.Destroy.Core"(ptr %self), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !89 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnPtr.Main() #0 !dbg !91 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnNullablePtr.call = call ptr @_Z17ReturnNullablePtrv(), !dbg !94 -// CHECK:STDOUT: ret ptr %ReturnNullablePtr.call, !dbg !95 +// CHECK:STDOUT: %ReturnNullablePtr.call = call ptr @_Z17ReturnNullablePtrv(), !dbg !86 +// CHECK:STDOUT: ret ptr %ReturnNullablePtr.call, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z17ReturnNullablePtrv() #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassPtrWithThunk.Main(ptr %_) #0 !dbg !96 { +// CHECK:STDOUT: define void @_CPassPtrWithThunk.Main(ptr %_) #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassNonnullPtrWithThunk.Main(ptr %p) #0 !dbg !101 { +// CHECK:STDOUT: define void @_CPassNonnullPtrWithThunk.Main(ptr %p) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc35_32.2.temp = alloca ptr, align 8, !dbg !104 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5"(ptr %p), !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc35_32.2.temp), !dbg !104 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc35_32.2.temp, align 8, !dbg !104 -// CHECK:STDOUT: %.loc35_32.4 = load ptr, ptr %.loc35_32.2.temp, align 8, !dbg !104 -// CHECK:STDOUT: call void @_Z24TakeNullablePtrWithThunkP9NullableCi.carbon_thunk._(ptr %.loc35_32.4), !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core"(ptr %.loc35_32.2.temp), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: %.loc35_32.2.temp = alloca ptr, align 8, !dbg !96 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5"(ptr %p), !dbg !96 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc35_32.2.temp), !dbg !96 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc35_32.2.temp, align 8, !dbg !96 +// CHECK:STDOUT: %.loc35_32.4 = load ptr, ptr %.loc35_32.2.temp, align 8, !dbg !96 +// CHECK:STDOUT: call void @_Z24TakeNullablePtrWithThunkP9NullableCi.carbon_thunk._(ptr %.loc35_32.4), !dbg !97 +// CHECK:STDOUT: call void @"_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core"(ptr %.loc35_32.2.temp), !dbg !96 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z24TakeNullablePtrWithThunkP9NullableCi.carbon_thunk._(ptr noundef %0) #2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !152 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !144 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !144 // CHECK:STDOUT: call void @_Z24TakeNullablePtrWithThunkP9NullableCi(ptr noundef %1, i32 noundef 0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnPtrWithThunk.Main() #0 !dbg !108 { +// CHECK:STDOUT: define ptr @_CReturnPtrWithThunk.Main() #0 !dbg !100 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnNullablePtrWithThunk__carbon_thunk.call = call ptr @_Z26ReturnNullablePtrWithThunki.carbon_thunk.(), !dbg !111 -// CHECK:STDOUT: ret ptr %ReturnNullablePtrWithThunk__carbon_thunk.call, !dbg !112 +// CHECK:STDOUT: %ReturnNullablePtrWithThunk__carbon_thunk.call = call ptr @_Z26ReturnNullablePtrWithThunki.carbon_thunk.(), !dbg !103 +// CHECK:STDOUT: ret ptr %ReturnNullablePtrWithThunk__carbon_thunk.call, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -333,35 +319,35 @@ fn Convert() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2"(ptr %self), !dbg !118 -// CHECK:STDOUT: ret ptr %1, !dbg !119 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2"(ptr %self), !dbg !110 +// CHECK:STDOUT: ret ptr %1, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2"(ptr %self) #0 !dbg !121 { -// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.e83c25d1d2fd22c2(ptr %self), !dbg !127 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2"(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.e83c25d1d2fd22c2(ptr %self), !dbg !119 +// CHECK:STDOUT: ret ptr %1, !dbg !120 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.e83c25d1d2fd22c2(ptr %value) #0 !dbg !122 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %value), !dbg !127 // CHECK:STDOUT: ret ptr %1, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.e83c25d1d2fd22c2(ptr %value) #0 !dbg !130 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %value), !dbg !135 -// CHECK:STDOUT: ret ptr %1, !dbg !136 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %self) #0 !dbg !138 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !143 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !143 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !143 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !147 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !145 -// CHECK:STDOUT: call void @"_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core"(ptr %1), !dbg !143 -// CHECK:STDOUT: ret ptr %2, !dbg !149 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %self) #0 !dbg !130 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !135 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !135 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !135 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !139 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !137 +// CHECK:STDOUT: call void @"_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core"(ptr %1), !dbg !135 +// CHECK:STDOUT: ret ptr %2, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z24TakeNullablePtrWithThunkP9NullableCi(ptr noundef, i32 noundef) #1 @@ -424,62 +410,54 @@ fn Convert() { // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !6) // CHECK:STDOUT: !73 = !DILocation(line: 22, column: 23, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5cf0c9a25f98a429:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !6) // CHECK:STDOUT: !77 = !DILocation(line: 22, column: 23, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5cf0c9a25f98a429:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !6) // CHECK:STDOUT: !81 = !DILocation(line: 22, column: 23, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.574ea10b2e6709a0:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !6) -// CHECK:STDOUT: !85 = !DILocation(line: 22, column: 23, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.574ea10b2e6709a0:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !6) -// CHECK:STDOUT: !89 = !DILocation(line: 22, column: 23, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !46, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !94 = !DILocation(line: 26, column: 10, scope: !91) -// CHECK:STDOUT: !95 = !DILocation(line: 26, column: 3, scope: !91) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !46, line: 29, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !100) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !6) -// CHECK:STDOUT: !99 = !DILocation(line: 29, column: 1, scope: !96) -// CHECK:STDOUT: !100 = !{!97} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !46, line: 34, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !107) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !6) -// CHECK:STDOUT: !104 = !DILocation(line: 35, column: 32, scope: !101) -// CHECK:STDOUT: !105 = !DILocation(line: 35, column: 3, scope: !101) -// CHECK:STDOUT: !106 = !DILocation(line: 34, column: 1, scope: !101) -// CHECK:STDOUT: !107 = !{!102} -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !46, line: 38, type: !10, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !111 = !DILocation(line: 39, column: 10, scope: !108) -// CHECK:STDOUT: !112 = !DILocation(line: 39, column: 3, scope: !108) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !120) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !46, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !47) +// CHECK:STDOUT: !86 = !DILocation(line: 26, column: 10, scope: !83) +// CHECK:STDOUT: !87 = !DILocation(line: 26, column: 3, scope: !83) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !46, line: 29, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !92) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !6) +// CHECK:STDOUT: !91 = !DILocation(line: 29, column: 1, scope: !88) +// CHECK:STDOUT: !92 = !{!89} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !46, line: 34, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !99) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !6) +// CHECK:STDOUT: !96 = !DILocation(line: 35, column: 32, scope: !93) +// CHECK:STDOUT: !97 = !DILocation(line: 35, column: 3, scope: !93) +// CHECK:STDOUT: !98 = !DILocation(line: 34, column: 1, scope: !93) +// CHECK:STDOUT: !99 = !{!94} +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !46, line: 38, type: !10, spFlags: DISPFlagDefinition, unit: !47) +// CHECK:STDOUT: !103 = !DILocation(line: 39, column: 10, scope: !100) +// CHECK:STDOUT: !104 = !DILocation(line: 39, column: 3, scope: !100) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.75a9143bcbb84fa5", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !112) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !6) +// CHECK:STDOUT: !110 = !DILocation(line: 106, column: 12, scope: !105) +// CHECK:STDOUT: !111 = !DILocation(line: 106, column: 5, scope: !105) +// CHECK:STDOUT: !112 = !{!106} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2", scope: null, file: !48, line: 80, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !121) // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !6) -// CHECK:STDOUT: !118 = !DILocation(line: 106, column: 12, scope: !113) -// CHECK:STDOUT: !119 = !DILocation(line: 106, column: 5, scope: !113) -// CHECK:STDOUT: !120 = !{!114} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.e83c25d1d2fd22c2", scope: null, file: !48, line: 80, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !129) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !6) -// CHECK:STDOUT: !127 = !DILocation(line: 81, column: 12, scope: !121) -// CHECK:STDOUT: !128 = !DILocation(line: 81, column: 5, scope: !121) -// CHECK:STDOUT: !129 = !{!122} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e83c25d1d2fd22c2", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !137) +// CHECK:STDOUT: !119 = !DILocation(line: 81, column: 12, scope: !113) +// CHECK:STDOUT: !120 = !DILocation(line: 81, column: 5, scope: !113) +// CHECK:STDOUT: !121 = !{!114} +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e83c25d1d2fd22c2", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !129) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !6) +// CHECK:STDOUT: !127 = !DILocation(line: 34, column: 12, scope: !122) +// CHECK:STDOUT: !128 = !DILocation(line: 34, column: 5, scope: !122) +// CHECK:STDOUT: !129 = !{!123} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !142) // CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !6) -// CHECK:STDOUT: !135 = !DILocation(line: 34, column: 12, scope: !130) -// CHECK:STDOUT: !136 = !DILocation(line: 34, column: 5, scope: !130) -// CHECK:STDOUT: !137 = !{!131} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !150) -// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !6) -// CHECK:STDOUT: !143 = !DILocation(line: 167, column: 14, scope: !138) -// CHECK:STDOUT: !145 = !DILocation(line: 167, column: 18, scope: !138) -// CHECK:STDOUT: !147 = !DILocation(line: 169, column: 5, scope: !138) -// CHECK:STDOUT: !149 = !DILocation(line: 170, column: 5, scope: !138) -// CHECK:STDOUT: !150 = !{!139} -// CHECK:STDOUT: !151 = !{!"p1 _ZTS9NullableC", !37, i64 0} -// CHECK:STDOUT: !152 = !{!151, !151, i64 0} +// CHECK:STDOUT: !135 = !DILocation(line: 167, column: 14, scope: !130) +// CHECK:STDOUT: !137 = !DILocation(line: 167, column: 18, scope: !130) +// CHECK:STDOUT: !139 = !DILocation(line: 169, column: 5, scope: !130) +// CHECK:STDOUT: !141 = !DILocation(line: 170, column: 5, scope: !130) +// CHECK:STDOUT: !142 = !{!131} +// CHECK:STDOUT: !143 = !{!"p1 _ZTS9NullableC", !37, i64 0} +// CHECK:STDOUT: !144 = !{!143, !143, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'add_const.carbon' @@ -488,196 +466,168 @@ fn Convert() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvert.Main() #0 !dbg !157 { +// CHECK:STDOUT: define void @_CConvert.Main() #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_21.1.temp = alloca ptr, align 8, !dbg !158 -// CHECK:STDOUT: %.loc11_21.5.temp = alloca ptr, align 8, !dbg !158 -// CHECK:STDOUT: %make.call = call ptr @_Z4makev(), !dbg !158 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.1.temp), !dbg !158 -// CHECK:STDOUT: store ptr %make.call, ptr %.loc11_21.1.temp, align 8, !dbg !158 -// CHECK:STDOUT: %.loc11_21.3 = load ptr, ptr %.loc11_21.1.temp, align 8, !dbg !158 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96"(ptr %.loc11_21.3), !dbg !158 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.5.temp), !dbg !158 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.5.temp, align 8, !dbg !158 -// CHECK:STDOUT: %.loc11_21.7 = load ptr, ptr %.loc11_21.5.temp, align 8, !dbg !158 -// CHECK:STDOUT: call void @_Z4takePK6ConstC(ptr %.loc11_21.7), !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.19661d0961df889d:core.Destroy.Core"(ptr %.loc11_21.5.temp), !dbg !158 -// CHECK:STDOUT: call void @"_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %.loc11_21.1.temp), !dbg !158 -// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: %.loc11_21.1.temp = alloca ptr, align 8, !dbg !150 +// CHECK:STDOUT: %.loc11_21.5.temp = alloca ptr, align 8, !dbg !150 +// CHECK:STDOUT: %make.call = call ptr @_Z4makev(), !dbg !150 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.1.temp), !dbg !150 +// CHECK:STDOUT: store ptr %make.call, ptr %.loc11_21.1.temp, align 8, !dbg !150 +// CHECK:STDOUT: %.loc11_21.3 = load ptr, ptr %.loc11_21.1.temp, align 8, !dbg !150 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96"(ptr %.loc11_21.3), !dbg !150 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.5.temp), !dbg !150 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.5.temp, align 8, !dbg !150 +// CHECK:STDOUT: %.loc11_21.7 = load ptr, ptr %.loc11_21.5.temp, align 8, !dbg !150 +// CHECK:STDOUT: call void @_Z4takePK6ConstC(ptr %.loc11_21.7), !dbg !151 +// CHECK:STDOUT: call void @"_CSelfDestruct.19661d0961df889d:core.Destroy.Core"(ptr %.loc11_21.5.temp), !dbg !150 +// CHECK:STDOUT: call void @"_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %.loc11_21.1.temp), !dbg !150 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %self) #0 !dbg !161 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %self) #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !163 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z4makev() #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core"(ptr %self) #0 !dbg !165 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core"(ptr %self) #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !167 +// CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4takePK6ConstC(ptr noundef) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self) #0 !dbg !169 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self) #0 !dbg !161 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !163 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self) #0 !dbg !165 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self), !dbg !167 +// CHECK:STDOUT: ret void, !dbg !167 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core"(ptr %self) #0 !dbg !169 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !171 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self) #0 !dbg !173 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.19661d0961df889d:core.Destroy.Core"(ptr %self) #0 !dbg !173 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core"(ptr %self), !dbg !175 // CHECK:STDOUT: ret void, !dbg !175 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f914f15dcbbdbae9:core.Destroy.Core"(ptr %self) #0 !dbg !177 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core"(ptr %self) #0 !dbg !177 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core"(ptr %self) #0 !dbg !181 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e3602e7640dfb844:core.Destroy.Core"(ptr %self) #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f914f15dcbbdbae9:core.Destroy.Core"(ptr %self), !dbg !183 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core"(ptr %self), !dbg !183 // CHECK:STDOUT: ret void, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.19661d0961df889d:core.Destroy.Core"(ptr %self) #0 !dbg !185 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bc918cd0012c1190:core.Destroy.Core"(ptr %self) #0 !dbg !185 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.19661d0961df889d:core.Destroy.Core"(ptr %self) #0 !dbg !189 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %self) #0 !dbg !189 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.19661d0961df889d:core.Destroy.Core"(ptr %self), !dbg !191 // CHECK:STDOUT: ret void, !dbg !191 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core"(ptr %self) #0 !dbg !193 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !195 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e3602e7640dfb844:core.Destroy.Core"(ptr %self) #0 !dbg !197 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core"(ptr %self), !dbg !199 -// CHECK:STDOUT: ret void, !dbg !199 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bc918cd0012c1190:core.Destroy.Core"(ptr %self) #0 !dbg !201 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !203 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bc918cd0012c1190:core.Destroy.Core"(ptr %self) #0 !dbg !205 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bc918cd0012c1190:core.Destroy.Core"(ptr %self), !dbg !207 -// CHECK:STDOUT: ret void, !dbg !207 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %self) #0 !dbg !209 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !211 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %self) #0 !dbg !213 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.78fd6ee82eacbbc3:core.Destroy.Core"(ptr %self), !dbg !215 -// CHECK:STDOUT: ret void, !dbg !215 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96"(ptr %self) #0 !dbg !217 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5"(ptr %self), !dbg !222 -// CHECK:STDOUT: ret ptr %1, !dbg !223 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96"(ptr %self) #0 !dbg !193 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5"(ptr %self), !dbg !198 +// CHECK:STDOUT: ret ptr %1, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5"(ptr %self) #0 !dbg !225 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !232 -// CHECK:STDOUT: %temp1 = alloca ptr, align 8, !dbg !232 -// CHECK:STDOUT: %1 = call i1 @_CHasValue.Optional.Core.0c3518913b4fb338(ptr %self), !dbg !230 -// CHECK:STDOUT: br i1 %1, label %2, label %7, !dbg !231 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5"(ptr %self) #0 !dbg !201 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !208 +// CHECK:STDOUT: %temp1 = alloca ptr, align 8, !dbg !208 +// CHECK:STDOUT: %1 = call i1 @_CHasValue.Optional.Core.0c3518913b4fb338(ptr %self), !dbg !206 +// CHECK:STDOUT: br i1 %1, label %2, label %7, !dbg !207 // CHECK:STDOUT: // CHECK:STDOUT: 2: ; preds = %0 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !232 -// CHECK:STDOUT: %3 = call ptr @_CGet.Optional.Core.0c3518913b4fb338(ptr %self), !dbg !232 -// CHECK:STDOUT: store ptr %3, ptr %temp, align 8, !dbg !232 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !232 -// CHECK:STDOUT: %4 = load ptr, ptr %temp, align 8, !dbg !232 -// CHECK:STDOUT: store ptr %4, ptr %temp1, align 8, !dbg !232 -// CHECK:STDOUT: %5 = load ptr, ptr %temp1, align 8, !dbg !232 -// CHECK:STDOUT: %6 = call ptr @_CSome.Optional.Core.305e266058820aa4(ptr %5), !dbg !233 -// CHECK:STDOUT: call void @"_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core"(ptr %temp1), !dbg !232 -// CHECK:STDOUT: call void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %temp), !dbg !232 -// CHECK:STDOUT: ret ptr %6, !dbg !234 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !208 +// CHECK:STDOUT: %3 = call ptr @_CGet.Optional.Core.0c3518913b4fb338(ptr %self), !dbg !208 +// CHECK:STDOUT: store ptr %3, ptr %temp, align 8, !dbg !208 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !208 +// CHECK:STDOUT: %4 = load ptr, ptr %temp, align 8, !dbg !208 +// CHECK:STDOUT: store ptr %4, ptr %temp1, align 8, !dbg !208 +// CHECK:STDOUT: %5 = load ptr, ptr %temp1, align 8, !dbg !208 +// CHECK:STDOUT: %6 = call ptr @_CSome.Optional.Core.305e266058820aa4(ptr %5), !dbg !209 +// CHECK:STDOUT: call void @"_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core"(ptr %temp1), !dbg !208 +// CHECK:STDOUT: call void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %temp), !dbg !208 +// CHECK:STDOUT: ret ptr %6, !dbg !210 // CHECK:STDOUT: // CHECK:STDOUT: 7: ; preds = %0 -// CHECK:STDOUT: %8 = call ptr @_CNone.Optional.Core.305e266058820aa4(), !dbg !235 -// CHECK:STDOUT: ret ptr %8, !dbg !236 +// CHECK:STDOUT: %8 = call ptr @_CNone.Optional.Core.305e266058820aa4(), !dbg !211 +// CHECK:STDOUT: ret ptr %8, !dbg !212 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.0c3518913b4fb338(ptr %self) #0 !dbg !238 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !244 -// CHECK:STDOUT: ret i1 %1, !dbg !245 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.0c3518913b4fb338(ptr %self) #0 !dbg !214 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !220 +// CHECK:STDOUT: ret i1 %1, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.0c3518913b4fb338(ptr %self) #0 !dbg !247 { -// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !253 -// CHECK:STDOUT: ret ptr %1, !dbg !254 +// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.0c3518913b4fb338(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !229 +// CHECK:STDOUT: ret ptr %1, !dbg !230 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.305e266058820aa4(ptr %value) #0 !dbg !256 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %value), !dbg !261 -// CHECK:STDOUT: ret ptr %1, !dbg !262 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.305e266058820aa4(ptr %value) #0 !dbg !232 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %value), !dbg !237 +// CHECK:STDOUT: ret ptr %1, !dbg !238 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.305e266058820aa4() #0 !dbg !264 { -// CHECK:STDOUT: ret ptr null, !dbg !268 +// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.305e266058820aa4() #0 !dbg !240 { +// CHECK:STDOUT: ret ptr null, !dbg !244 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !269 { -// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !275 -// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !276 -// CHECK:STDOUT: ret i1 %2, !dbg !277 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !245 { +// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !251 +// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !252 +// CHECK:STDOUT: ret i1 %2, !dbg !253 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !279 { -// CHECK:STDOUT: ret ptr %value, !dbg !285 +// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !255 { +// CHECK:STDOUT: ret ptr %value, !dbg !261 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %self) #0 !dbg !287 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !292 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !292 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !292 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !296 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !294 -// CHECK:STDOUT: call void @"_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core"(ptr %1), !dbg !292 -// CHECK:STDOUT: ret ptr %2, !dbg !298 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %self) #0 !dbg !263 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !268 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !268 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !268 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !272 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !270 +// CHECK:STDOUT: call void @"_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core"(ptr %1), !dbg !268 +// CHECK:STDOUT: ret ptr %2, !dbg !274 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -687,7 +637,7 @@ 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.dbg.cu = !{!154} +// CHECK:STDOUT: !llvm.dbg.cu = !{!146} // CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!45} // CHECK:STDOUT: @@ -709,117 +659,101 @@ fn Convert() { // CHECK:STDOUT: !48 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !62 = !{!6, !6} // CHECK:STDOUT: !63 = !DISubroutineType(types: !62) -// CHECK:STDOUT: !153 = !DIFile(filename: "add_const.carbon", directory: "") -// CHECK:STDOUT: !154 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !153, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !155 = !{null} -// CHECK:STDOUT: !156 = !DISubroutineType(types: !155) -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !153, line: 10, type: !156, spFlags: DISPFlagDefinition, unit: !154) -// CHECK:STDOUT: !158 = !DILocation(line: 11, column: 12, scope: !157) -// CHECK:STDOUT: !159 = !DILocation(line: 11, column: 3, scope: !157) -// CHECK:STDOUT: !160 = !DILocation(line: 10, column: 1, scope: !157) -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !164) +// CHECK:STDOUT: !145 = !DIFile(filename: "add_const.carbon", directory: "") +// CHECK:STDOUT: !146 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !145, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !147 = !{null} +// CHECK:STDOUT: !148 = !DISubroutineType(types: !147) +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !145, line: 10, type: !148, spFlags: DISPFlagDefinition, unit: !146) +// CHECK:STDOUT: !150 = !DILocation(line: 11, column: 12, scope: !149) +// CHECK:STDOUT: !151 = !DILocation(line: 11, column: 3, scope: !149) +// CHECK:STDOUT: !152 = !DILocation(line: 10, column: 1, scope: !149) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !156) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !6) +// CHECK:STDOUT: !155 = !DILocation(line: 164, column: 19, scope: !153) +// CHECK:STDOUT: !156 = !{!154} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !160) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !6) +// CHECK:STDOUT: !159 = !DILocation(line: 164, column: 19, scope: !157) +// CHECK:STDOUT: !160 = !{!158} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !164) // CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !6) -// CHECK:STDOUT: !163 = !DILocation(line: 164, column: 19, scope: !161) +// CHECK:STDOUT: !163 = !DILocation(line: 11, column: 12, scope: !161) // CHECK:STDOUT: !164 = !{!162} -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !168) +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bdb5ffe218b7af7d:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !168) // CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !6) -// CHECK:STDOUT: !167 = !DILocation(line: 164, column: 19, scope: !165) +// CHECK:STDOUT: !167 = !DILocation(line: 11, column: 12, scope: !165) // CHECK:STDOUT: !168 = !{!166} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bdb5ffe218b7af7d:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !172) +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !172) // CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !6) // CHECK:STDOUT: !171 = !DILocation(line: 11, column: 12, scope: !169) // CHECK:STDOUT: !172 = !{!170} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bdb5ffe218b7af7d:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !176) +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.19661d0961df889d:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !176) // CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !6) // CHECK:STDOUT: !175 = !DILocation(line: 11, column: 12, scope: !173) // CHECK:STDOUT: !176 = !{!174} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f914f15dcbbdbae9:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !180) +// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !180) // CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !6) // CHECK:STDOUT: !179 = !DILocation(line: 11, column: 12, scope: !177) // CHECK:STDOUT: !180 = !{!178} -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f914f15dcbbdbae9:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !184) +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e3602e7640dfb844:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !184) // CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !6) // CHECK:STDOUT: !183 = !DILocation(line: 11, column: 12, scope: !181) // CHECK:STDOUT: !184 = !{!182} -// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.19661d0961df889d:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !188) +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bc918cd0012c1190:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !188) // CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !6) // CHECK:STDOUT: !187 = !DILocation(line: 11, column: 12, scope: !185) // CHECK:STDOUT: !188 = !{!186} -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.19661d0961df889d:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !192) +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core", scope: null, file: !145, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !192) // CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !6) // CHECK:STDOUT: !191 = !DILocation(line: 11, column: 12, scope: !189) // CHECK:STDOUT: !192 = !{!190} -// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e3602e7640dfb844:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !196) +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !200) // CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !6) -// CHECK:STDOUT: !195 = !DILocation(line: 11, column: 12, scope: !193) -// CHECK:STDOUT: !196 = !{!194} -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e3602e7640dfb844:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !200) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !6) -// CHECK:STDOUT: !199 = !DILocation(line: 11, column: 12, scope: !197) -// CHECK:STDOUT: !200 = !{!198} -// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bc918cd0012c1190:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !204) +// CHECK:STDOUT: !198 = !DILocation(line: 106, column: 12, scope: !193) +// CHECK:STDOUT: !199 = !DILocation(line: 106, column: 5, scope: !193) +// CHECK:STDOUT: !200 = !{!194} +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5", scope: null, file: !48, line: 95, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !213) // CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6) -// CHECK:STDOUT: !203 = !DILocation(line: 11, column: 12, scope: !201) -// CHECK:STDOUT: !204 = !{!202} -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bc918cd0012c1190:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !208) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !6) -// CHECK:STDOUT: !207 = !DILocation(line: 11, column: 12, scope: !205) -// CHECK:STDOUT: !208 = !{!206} -// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.78fd6ee82eacbbc3:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !212) -// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) -// CHECK:STDOUT: !211 = !DILocation(line: 11, column: 12, scope: !209) -// CHECK:STDOUT: !212 = !{!210} -// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.78fd6ee82eacbbc3:core.Destroy.Core", scope: null, file: !153, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !216) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !6) -// CHECK:STDOUT: !215 = !DILocation(line: 11, column: 12, scope: !213) -// CHECK:STDOUT: !216 = !{!214} -// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.7d29ea9e6f62bf96", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !224) -// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !6) -// CHECK:STDOUT: !222 = !DILocation(line: 106, column: 12, scope: !217) -// CHECK:STDOUT: !223 = !DILocation(line: 106, column: 5, scope: !217) -// CHECK:STDOUT: !224 = !{!218} -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.c661605f12aa337a.Core:OptionalAs.1dac4564233fecd1.Core.c5881e9a6965c8a5", scope: null, file: !48, line: 95, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !237) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !6) -// CHECK:STDOUT: !230 = !DILocation(line: 96, column: 9, scope: !225) -// CHECK:STDOUT: !231 = !DILocation(line: 96, column: 8, scope: !225) -// CHECK:STDOUT: !232 = !DILocation(line: 97, column: 31, scope: !225) -// CHECK:STDOUT: !233 = !DILocation(line: 97, column: 14, scope: !225) -// CHECK:STDOUT: !234 = !DILocation(line: 97, column: 7, scope: !225) -// CHECK:STDOUT: !235 = !DILocation(line: 99, column: 12, scope: !225) -// CHECK:STDOUT: !236 = !DILocation(line: 99, column: 5, scope: !225) -// CHECK:STDOUT: !237 = !{!226} -// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.0c3518913b4fb338", scope: null, file: !48, line: 36, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !246) -// CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !6) -// CHECK:STDOUT: !244 = !DILocation(line: 37, column: 12, scope: !238) -// CHECK:STDOUT: !245 = !DILocation(line: 37, column: 5, scope: !238) -// CHECK:STDOUT: !246 = !{!239} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.0c3518913b4fb338", scope: null, file: !48, line: 39, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !255) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !6) -// CHECK:STDOUT: !253 = !DILocation(line: 40, column: 12, scope: !247) -// CHECK:STDOUT: !254 = !DILocation(line: 40, column: 5, scope: !247) -// CHECK:STDOUT: !255 = !{!248} -// CHECK:STDOUT: !256 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.305e266058820aa4", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !263) -// CHECK:STDOUT: !257 = !DILocalVariable(arg: 1, scope: !256, type: !6) -// CHECK:STDOUT: !261 = !DILocation(line: 34, column: 12, scope: !256) -// CHECK:STDOUT: !262 = !DILocation(line: 34, column: 5, scope: !256) -// CHECK:STDOUT: !263 = !{!257} -// CHECK:STDOUT: !264 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.305e266058820aa4", scope: null, file: !48, line: 30, type: !10, spFlags: DISPFlagDefinition, unit: !154) -// CHECK:STDOUT: !268 = !DILocation(line: 31, column: 5, scope: !264) -// CHECK:STDOUT: !269 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 172, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !278) -// CHECK:STDOUT: !270 = !DILocalVariable(arg: 1, scope: !269, type: !6) -// CHECK:STDOUT: !275 = !DILocation(line: 173, column: 16, scope: !269) -// CHECK:STDOUT: !276 = !DILocation(line: 173, column: 12, scope: !269) -// CHECK:STDOUT: !277 = !DILocation(line: 173, column: 5, scope: !269) -// CHECK:STDOUT: !278 = !{!270} -// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 175, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !286) -// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !6) -// CHECK:STDOUT: !285 = !DILocation(line: 176, column: 5, scope: !279) -// CHECK:STDOUT: !286 = !{!280} -// CHECK:STDOUT: !287 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !299) -// CHECK:STDOUT: !288 = !DILocalVariable(arg: 1, scope: !287, type: !6) -// CHECK:STDOUT: !292 = !DILocation(line: 167, column: 14, scope: !287) -// CHECK:STDOUT: !294 = !DILocation(line: 167, column: 18, scope: !287) -// CHECK:STDOUT: !296 = !DILocation(line: 169, column: 5, scope: !287) -// CHECK:STDOUT: !298 = !DILocation(line: 170, column: 5, scope: !287) -// CHECK:STDOUT: !299 = !{!288} +// CHECK:STDOUT: !206 = !DILocation(line: 96, column: 9, scope: !201) +// CHECK:STDOUT: !207 = !DILocation(line: 96, column: 8, scope: !201) +// CHECK:STDOUT: !208 = !DILocation(line: 97, column: 31, scope: !201) +// CHECK:STDOUT: !209 = !DILocation(line: 97, column: 14, scope: !201) +// CHECK:STDOUT: !210 = !DILocation(line: 97, column: 7, scope: !201) +// CHECK:STDOUT: !211 = !DILocation(line: 99, column: 12, scope: !201) +// CHECK:STDOUT: !212 = !DILocation(line: 99, column: 5, scope: !201) +// CHECK:STDOUT: !213 = !{!202} +// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.0c3518913b4fb338", scope: null, file: !48, line: 36, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !222) +// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !6) +// CHECK:STDOUT: !220 = !DILocation(line: 37, column: 12, scope: !214) +// CHECK:STDOUT: !221 = !DILocation(line: 37, column: 5, scope: !214) +// CHECK:STDOUT: !222 = !{!215} +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.0c3518913b4fb338", scope: null, file: !48, line: 39, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !231) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !6) +// CHECK:STDOUT: !229 = !DILocation(line: 40, column: 12, scope: !223) +// CHECK:STDOUT: !230 = !DILocation(line: 40, column: 5, scope: !223) +// CHECK:STDOUT: !231 = !{!224} +// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.305e266058820aa4", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !239) +// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !6) +// CHECK:STDOUT: !237 = !DILocation(line: 34, column: 12, scope: !232) +// CHECK:STDOUT: !238 = !DILocation(line: 34, column: 5, scope: !232) +// CHECK:STDOUT: !239 = !{!233} +// CHECK:STDOUT: !240 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.305e266058820aa4", scope: null, file: !48, line: 30, type: !10, spFlags: DISPFlagDefinition, unit: !146) +// CHECK:STDOUT: !244 = !DILocation(line: 31, column: 5, scope: !240) +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 172, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !254) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !6) +// CHECK:STDOUT: !251 = !DILocation(line: 173, column: 16, scope: !245) +// CHECK:STDOUT: !252 = !DILocation(line: 173, column: 12, scope: !245) +// CHECK:STDOUT: !253 = !DILocation(line: 173, column: 5, scope: !245) +// CHECK:STDOUT: !254 = !{!246} +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 175, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !262) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !6) +// CHECK:STDOUT: !261 = !DILocation(line: 176, column: 5, scope: !255) +// CHECK:STDOUT: !262 = !{!256} +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !146, retainedNodes: !275) +// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !6) +// CHECK:STDOUT: !268 = !DILocation(line: 167, column: 14, scope: !263) +// CHECK:STDOUT: !270 = !DILocation(line: 167, column: 18, scope: !263) +// CHECK:STDOUT: !272 = !DILocation(line: 169, column: 5, scope: !263) +// CHECK:STDOUT: !274 = !DILocation(line: 170, column: 5, scope: !263) +// CHECK:STDOUT: !275 = !{!264} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/reference.carbon b/toolchain/lower/testdata/interop/cpp/reference.carbon index b6664f37661a..92814678daa9 100644 --- a/toolchain/lower/testdata/interop/cpp/reference.carbon +++ b/toolchain/lower/testdata/interop/cpp/reference.carbon @@ -173,8 +173,8 @@ fn GetRefs() { // CHECK:STDOUT: define internal void @_ZN1CC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !74 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,8 +191,8 @@ fn GetRefs() { // CHECK:STDOUT: define internal void @_Z9TakeCRRefO1C.carbon_thunk.v(ptr noundef %0) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 // CHECK:STDOUT: call void @_Z9TakeCRRefO1C(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -207,8 +207,8 @@ fn GetRefs() { // CHECK:STDOUT: define internal void @_Z13TakeConstCRefRK1C.carbon_thunk._(ptr noundef %0) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 // CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -219,8 +219,8 @@ fn GetRefs() { // CHECK:STDOUT: define internal void @_Z11TakeIntRRefOi.carbon_thunk.v(ptr noundef %0) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 // CHECK:STDOUT: call void @_Z11TakeIntRRefOi(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -232,24 +232,17 @@ fn GetRefs() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !65 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !67 -// CHECK:STDOUT: ret void, !dbg !67 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z15TakeConstIntRefRKi.carbon_thunk._(ptr noundef %0) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 // CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -258,9 +251,9 @@ fn GetRefs() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #5 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !69 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !65 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -287,8 +280,8 @@ fn GetRefs() { // CHECK:STDOUT: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!19} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!87} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -328,30 +321,26 @@ fn GetRefs() { // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !20) // CHECK:STDOUT: !59 = !DILocation(line: 12, column: 23, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !20) // CHECK:STDOUT: !63 = !DILocation(line: 12, column: 23, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20) -// CHECK:STDOUT: !67 = !DILocation(line: 12, column: 23, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 28, scope: !69) -// CHECK:STDOUT: !73 = !DILocation(line: 9, column: 21, scope: !69) -// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0} -// CHECK:STDOUT: !76 = !{!"any pointer", !75, i64 0} -// CHECK:STDOUT: !77 = !{!"p1 _ZTS1C", !76, i64 0} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 28, scope: !65) +// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 21, scope: !65) +// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0} +// CHECK:STDOUT: !72 = !{!"any pointer", !71, i64 0} +// CHECK:STDOUT: !73 = !{!"p1 _ZTS1C", !72, i64 0} +// CHECK:STDOUT: !74 = !{!73, !73, i64 0} +// CHECK:STDOUT: !76 = !{!"int", !71, i64 0} +// CHECK:STDOUT: !77 = !{!"p1 int", !72, i64 0} // CHECK:STDOUT: !78 = !{!77, !77, i64 0} -// CHECK:STDOUT: !80 = !{!"int", !75, i64 0} -// CHECK:STDOUT: !81 = !{!"p1 int", !76, i64 0} -// CHECK:STDOUT: !82 = !{!81, !81, i64 0} -// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0} -// CHECK:STDOUT: !87 = !{!86, !80, i64 0} +// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !83 = !{!82, !76, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'pass_references_via_thunk.carbon' @@ -365,51 +354,51 @@ fn GetRefs() { // CHECK:STDOUT: @C.val.loc20_20.3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassRefs.Main() #0 !dbg !90 { +// CHECK:STDOUT: define void @_CPassRefs.Main() #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !91 -// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !96 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !100 -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !105 -// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !107 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !91 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !91 -// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !96 -// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr @C.val), !dbg !96 -// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !100 -// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !100 -// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !105 -// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !105 -// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !106 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !105 -// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !107 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !107 -// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !107 -// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !108 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc26_23.2.temp), !dbg !107 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !91 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !87 +// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !92 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !96 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !101 +// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !103 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !87 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !87 +// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !91 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !92 +// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !93 +// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr @C.val), !dbg !92 +// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !95 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !96 +// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !96 +// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !100 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !101 +// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !101 +// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !102 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %_.var), !dbg !101 +// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !103 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !103 +// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !103 +// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !104 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %.loc26_23.2.temp), !dbg !103 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %n.var), !dbg !96 +// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !87 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN1CC1Ev.carbon_thunk.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !74 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !112 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !108 +// CHECK:STDOUT: ret void, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -417,8 +406,8 @@ fn GetRefs() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78, !nonnull !134 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74, !nonnull !126 // CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -428,16 +417,16 @@ fn GetRefs() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 // CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -445,8 +434,8 @@ fn GetRefs() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 // CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -456,8 +445,8 @@ fn GetRefs() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82, !nonnull !134, !align !136 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78, !nonnull !126, !align !128 // CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -467,38 +456,31 @@ fn GetRefs() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 // CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !117 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !117 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !121 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !123 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !125 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !127 -// CHECK:STDOUT: ret void, !dbg !127 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr noundef %0) #3 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.ForceThunk, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !82 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !82 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !78 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !78 // CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -507,9 +489,9 @@ fn GetRefs() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !129 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !121 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !124 +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1)) #5 @@ -536,9 +518,9 @@ 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.dbg.cu = !{!89} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!87} +// CHECK:STDOUT: !llvm.dbg.cu = !{!85} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -553,57 +535,53 @@ fn GetRefs() { // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) // CHECK:STDOUT: !28 = !{null, !20} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0} -// CHECK:STDOUT: !76 = !{!"any pointer", !75, i64 0} -// CHECK:STDOUT: !77 = !{!"p1 _ZTS1C", !76, i64 0} +// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0} +// CHECK:STDOUT: !72 = !{!"any pointer", !71, i64 0} +// CHECK:STDOUT: !73 = !{!"p1 _ZTS1C", !72, i64 0} +// CHECK:STDOUT: !74 = !{!73, !73, i64 0} +// CHECK:STDOUT: !76 = !{!"int", !71, i64 0} +// CHECK:STDOUT: !77 = !{!"p1 int", !72, i64 0} // CHECK:STDOUT: !78 = !{!77, !77, i64 0} -// CHECK:STDOUT: !80 = !{!"int", !75, i64 0} -// CHECK:STDOUT: !81 = !{!"p1 int", !76, i64 0} -// CHECK:STDOUT: !82 = !{!81, !81, i64 0} -// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0} -// CHECK:STDOUT: !87 = !{!86, !80, i64 0} -// CHECK:STDOUT: !88 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "") -// CHECK:STDOUT: !89 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !88, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !88, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !89) -// CHECK:STDOUT: !91 = !DILocation(line: 18, column: 3, scope: !90) -// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 3, scope: !90) -// CHECK:STDOUT: !96 = !DILocation(line: 20, column: 17, scope: !90) -// CHECK:STDOUT: !97 = !DILocation(line: 20, column: 3, scope: !90) -// CHECK:STDOUT: !99 = !DILocation(line: 21, column: 3, scope: !90) -// CHECK:STDOUT: !100 = !DILocation(line: 23, column: 3, scope: !90) -// CHECK:STDOUT: !104 = !DILocation(line: 24, column: 3, scope: !90) -// CHECK:STDOUT: !105 = !DILocation(line: 13, column: 23, scope: !90) -// CHECK:STDOUT: !106 = !DILocation(line: 25, column: 3, scope: !90) -// CHECK:STDOUT: !107 = !DILocation(line: 26, column: 23, scope: !90) -// CHECK:STDOUT: !108 = !DILocation(line: 26, column: 3, scope: !90) -// CHECK:STDOUT: !109 = !DILocation(line: 17, column: 1, scope: !90) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !88, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !89) -// CHECK:STDOUT: !112 = !DILocation(line: 5, column: 7, scope: !110) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !88, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !116) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !23) -// CHECK:STDOUT: !115 = !DILocation(line: 20, column: 17, scope: !113) +// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !83 = !{!82, !76, i64 0} +// CHECK:STDOUT: !84 = !DIFile(filename: "pass_references_via_thunk.carbon", directory: "") +// CHECK:STDOUT: !85 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !84, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !84, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !85) +// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 3, scope: !86) +// CHECK:STDOUT: !91 = !DILocation(line: 19, column: 3, scope: !86) +// CHECK:STDOUT: !92 = !DILocation(line: 20, column: 17, scope: !86) +// CHECK:STDOUT: !93 = !DILocation(line: 20, column: 3, scope: !86) +// CHECK:STDOUT: !95 = !DILocation(line: 21, column: 3, scope: !86) +// CHECK:STDOUT: !96 = !DILocation(line: 23, column: 3, scope: !86) +// CHECK:STDOUT: !100 = !DILocation(line: 24, column: 3, scope: !86) +// CHECK:STDOUT: !101 = !DILocation(line: 13, column: 23, scope: !86) +// CHECK:STDOUT: !102 = !DILocation(line: 25, column: 3, scope: !86) +// CHECK:STDOUT: !103 = !DILocation(line: 26, column: 23, scope: !86) +// CHECK:STDOUT: !104 = !DILocation(line: 26, column: 3, scope: !86) +// CHECK:STDOUT: !105 = !DILocation(line: 17, column: 1, scope: !86) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !84, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !85) +// CHECK:STDOUT: !108 = !DILocation(line: 5, column: 7, scope: !106) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !84, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !23) +// CHECK:STDOUT: !111 = !DILocation(line: 20, column: 17, scope: !109) +// CHECK:STDOUT: !112 = !{!110} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !84, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !116) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !20) +// CHECK:STDOUT: !115 = !DILocation(line: 13, column: 23, scope: !113) // CHECK:STDOUT: !116 = !{!114} -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !120) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !84, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !120) // CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !20) // CHECK:STDOUT: !119 = !DILocation(line: 13, column: 23, scope: !117) // CHECK:STDOUT: !120 = !{!118} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !124) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !20) -// CHECK:STDOUT: !123 = !DILocation(line: 13, column: 23, scope: !121) -// CHECK:STDOUT: !124 = !{!122} -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !88, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !128) -// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !20) -// CHECK:STDOUT: !127 = !DILocation(line: 13, column: 23, scope: !125) -// CHECK:STDOUT: !128 = !{!126} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !89) -// CHECK:STDOUT: !132 = !DILocation(line: 9, column: 28, scope: !129) -// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 21, scope: !129) -// CHECK:STDOUT: !134 = !{} -// CHECK:STDOUT: !136 = !{i64 4} +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !85) +// CHECK:STDOUT: !124 = !DILocation(line: 9, column: 28, scope: !121) +// CHECK:STDOUT: !125 = !DILocation(line: 9, column: 21, scope: !121) +// CHECK:STDOUT: !126 = !{} +// CHECK:STDOUT: !128 = !{i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_references.carbon' @@ -612,15 +590,15 @@ fn GetRefs() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !139 { +// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !131 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !140 -// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !143 -// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !146 -// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !149 -// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !152 -// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !155 -// CHECK:STDOUT: ret void, !dbg !158 +// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !132 +// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !135 +// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !138 +// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !141 +// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !144 +// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !147 +// CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef nonnull align 1 dereferenceable(1) ptr @_Z10ReturnCRefv() #1 @@ -638,32 +616,32 @@ 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.dbg.cu = !{!138} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!87} +// CHECK:STDOUT: !llvm.dbg.cu = !{!130} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0} -// CHECK:STDOUT: !80 = !{!"int", !75, i64 0} -// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0} -// CHECK:STDOUT: !87 = !{!86, !80, i64 0} -// CHECK:STDOUT: !137 = !DIFile(filename: "return_references.carbon", directory: "") -// CHECK:STDOUT: !138 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !137, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !137, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !138) -// CHECK:STDOUT: !140 = !DILocation(line: 17, column: 22, scope: !139) -// CHECK:STDOUT: !143 = !DILocation(line: 18, column: 22, scope: !139) -// CHECK:STDOUT: !146 = !DILocation(line: 19, column: 28, scope: !139) -// CHECK:STDOUT: !149 = !DILocation(line: 21, column: 20, scope: !139) -// CHECK:STDOUT: !152 = !DILocation(line: 22, column: 20, scope: !139) -// CHECK:STDOUT: !155 = !DILocation(line: 23, column: 26, scope: !139) -// CHECK:STDOUT: !158 = !DILocation(line: 16, column: 1, scope: !139) +// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0} +// CHECK:STDOUT: !76 = !{!"int", !71, i64 0} +// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !83 = !{!82, !76, i64 0} +// CHECK:STDOUT: !129 = !DIFile(filename: "return_references.carbon", directory: "") +// CHECK:STDOUT: !130 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !129, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !129, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !130) +// CHECK:STDOUT: !132 = !DILocation(line: 17, column: 22, scope: !131) +// CHECK:STDOUT: !135 = !DILocation(line: 18, column: 22, scope: !131) +// CHECK:STDOUT: !138 = !DILocation(line: 19, column: 28, scope: !131) +// CHECK:STDOUT: !141 = !DILocation(line: 21, column: 20, scope: !131) +// CHECK:STDOUT: !144 = !DILocation(line: 22, column: 20, scope: !131) +// CHECK:STDOUT: !147 = !DILocation(line: 23, column: 26, scope: !131) +// CHECK:STDOUT: !150 = !DILocation(line: 16, column: 1, scope: !131) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_references_via_thunk.carbon' @@ -674,15 +652,15 @@ fn GetRefs() { // CHECK:STDOUT: %class.ForceThunk.23 = type { i8 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !161 { +// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !162 -// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !165 -// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !168 -// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !171 -// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !174 -// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !177 -// CHECK:STDOUT: ret void, !dbg !180 +// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !154 +// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !157 +// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !160 +// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !163 +// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !166 +// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !169 +// CHECK:STDOUT: ret void, !dbg !172 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -749,30 +727,30 @@ 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.dbg.cu = !{!160} -// CHECK:STDOUT: !llvm.module.flags = !{!83, !84, !85, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!87} +// CHECK:STDOUT: !llvm.dbg.cu = !{!152} +// CHECK:STDOUT: !llvm.module.flags = !{!79, !80, !81, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !74 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !75 = !{!"omnipotent char", !74, i64 0} -// CHECK:STDOUT: !80 = !{!"int", !75, i64 0} -// CHECK:STDOUT: !83 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !84 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !85 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !86 = !{!"__libc_errno", !80, i64 0} -// CHECK:STDOUT: !87 = !{!86, !80, i64 0} -// CHECK:STDOUT: !159 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "") -// CHECK:STDOUT: !160 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !159, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !159, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !160) -// CHECK:STDOUT: !162 = !DILocation(line: 18, column: 22, scope: !161) -// CHECK:STDOUT: !165 = !DILocation(line: 19, column: 22, scope: !161) -// CHECK:STDOUT: !168 = !DILocation(line: 20, column: 28, scope: !161) -// CHECK:STDOUT: !171 = !DILocation(line: 22, column: 20, scope: !161) -// CHECK:STDOUT: !174 = !DILocation(line: 23, column: 20, scope: !161) -// CHECK:STDOUT: !177 = !DILocation(line: 24, column: 26, scope: !161) -// CHECK:STDOUT: !180 = !DILocation(line: 17, column: 1, scope: !161) +// CHECK:STDOUT: !70 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !71 = !{!"omnipotent char", !70, i64 0} +// CHECK:STDOUT: !76 = !{!"int", !71, i64 0} +// CHECK:STDOUT: !79 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !80 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !81 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !82 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !83 = !{!82, !76, i64 0} +// CHECK:STDOUT: !151 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "") +// CHECK:STDOUT: !152 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !151, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !151, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !152) +// CHECK:STDOUT: !154 = !DILocation(line: 18, column: 22, scope: !153) +// CHECK:STDOUT: !157 = !DILocation(line: 19, column: 22, scope: !153) +// CHECK:STDOUT: !160 = !DILocation(line: 20, column: 28, scope: !153) +// CHECK:STDOUT: !163 = !DILocation(line: 22, column: 20, scope: !153) +// CHECK:STDOUT: !166 = !DILocation(line: 23, column: 20, scope: !153) +// CHECK:STDOUT: !169 = !DILocation(line: 24, column: 26, scope: !153) +// CHECK:STDOUT: !172 = !DILocation(line: 17, column: 1, scope: !153) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon index b8072abb8f2a..7a9759dc3996 100644 --- a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon +++ b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_pointer.carbon @@ -118,59 +118,52 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !31 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !31 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !37 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !41 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !52 -// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !53 -// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !53 -// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !53 -// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !53 -// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !53 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !53 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 8, !dbg !53 -// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !53 -// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !52 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !48 +// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !49 +// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !49 +// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !49 +// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !49 +// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !49 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !49 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 8, !dbg !49 +// CHECK:STDOUT: store ptr getelementptr inbounds ([3 x i32], ptr @array.loc13_50.15, i32 1), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !49 +// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !48 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !51 +// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !49 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !49 +// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -179,11 +172,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %list.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %"class.std::initializer_list", align 8 -// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !91 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !93 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !93 -// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !91 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !98 +// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !87 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !89 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !89 +// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !87 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !94 // CHECK:STDOUT: %2 = getelementptr inbounds nuw { ptr, ptr }, ptr %agg.tmp, i32 0, i32 0 // CHECK:STDOUT: %3 = load ptr, ptr %2, align 8 // CHECK:STDOUT: %4 = getelementptr inbounds nuw { ptr, ptr }, ptr %agg.tmp, i32 0, i32 1 @@ -196,54 +189,54 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !93 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !89 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !61 { +// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !62 -// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !63 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !63 -// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !63 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !63 -// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !63 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !63 -// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !63 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !63 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !62 -// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !62 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !62 -// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !62 -// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !62 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !58 +// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !59 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !58 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !59 +// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !59 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !59 +// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !59 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !59 +// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !59 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !59 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !58 +// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !58 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !58 +// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !58 +// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !58 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !61 +// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !59 +// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !100 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !96 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !96 // CHECK:STDOUT: call void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -252,37 +245,37 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !96 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %self), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !83 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !85 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: @@ -298,7 +291,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8 // CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, ptr }, ptr %list, i32 0, i32 1 // CHECK:STDOUT: store ptr %list.coerce1, ptr %1, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !93 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !89 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -307,7 +300,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !96 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -322,8 +315,8 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!101, !102, !103, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!105} +// CHECK:STDOUT: !llvm.module.flags = !{!97, !98, !99, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!101} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -351,76 +344,72 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !6) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 42, scope: !27) // CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !6) // CHECK:STDOUT: !33 = !DILocation(line: 13, column: 42, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !6) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !9) // CHECK:STDOUT: !37 = !DILocation(line: 13, column: 42, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !9) // CHECK:STDOUT: !41 = !DILocation(line: 13, column: 42, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !9) -// CHECK:STDOUT: !45 = !DILocation(line: 13, column: 42, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 13, column: 3, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !9) -// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !52 = !DILocation(line: 18, column: 3, scope: !51) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 28, scope: !51) -// CHECK:STDOUT: !55 = !DILocation(line: 19, column: 3, scope: !51) -// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 1, scope: !51) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !9) -// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !62 = !DILocation(line: 23, column: 3, scope: !61) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 58, scope: !61) -// CHECK:STDOUT: !65 = !DILocation(line: 24, column: 3, scope: !61) -// CHECK:STDOUT: !66 = !DILocation(line: 22, column: 1, scope: !61) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !22, line: 164, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 18, column: 28, scope: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 19, column: 3, scope: !47) +// CHECK:STDOUT: !52 = !DILocation(line: 17, column: 1, scope: !47) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !9) +// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 3, scope: !53) +// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !58 = !DILocation(line: 23, column: 3, scope: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 23, column: 58, scope: !57) +// CHECK:STDOUT: !61 = !DILocation(line: 24, column: 3, scope: !57) +// CHECK:STDOUT: !62 = !DILocation(line: 22, column: 1, scope: !57) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !22, line: 164, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !9) +// CHECK:STDOUT: !65 = !DILocation(line: 164, column: 19, scope: !63) +// CHECK:STDOUT: !66 = !{!64} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !9) -// CHECK:STDOUT: !69 = !DILocation(line: 164, column: 19, scope: !67) +// CHECK:STDOUT: !69 = !DILocation(line: 23, column: 58, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !9) // CHECK:STDOUT: !73 = !DILocation(line: 23, column: 58, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !9) // CHECK:STDOUT: !77 = !DILocation(line: 23, column: 58, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) // CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !9) -// CHECK:STDOUT: !81 = !DILocation(line: 23, column: 58, scope: !79) +// CHECK:STDOUT: !81 = !DILocation(line: 23, column: 3, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !9) -// CHECK:STDOUT: !85 = !DILocation(line: 23, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !88 = !{!"omnipotent char", !87, i64 0} -// CHECK:STDOUT: !89 = !{!"any pointer", !88, i64 0} -// CHECK:STDOUT: !90 = !{!"p1 _ZTSSt16initializer_listIiE", !89, i64 0} -// CHECK:STDOUT: !91 = !{!90, !90, i64 0} -// CHECK:STDOUT: !92 = !{!"p1 _ZTS11vector_like", !89, i64 0} -// CHECK:STDOUT: !93 = !{!92, !92, i64 0} -// CHECK:STDOUT: !94 = !{!"int", !88, i64 0} -// CHECK:STDOUT: !95 = !{!"p1 int", !89, i64 0} -// CHECK:STDOUT: !97 = !{!95, !95, i64 0} -// CHECK:STDOUT: !98 = !{i64 0, i64 8, !97, i64 8, i64 8, !97} -// CHECK:STDOUT: !99 = !{!"p1 _ZTS15nontrivial_dtor", !89, i64 0} -// CHECK:STDOUT: !100 = !{!99, !99, i64 0} -// CHECK:STDOUT: !101 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !102 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !103 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !104 = !{!"__libc_errno", !94, i64 0} -// CHECK:STDOUT: !105 = !{!104, !94, i64 0} +// CHECK:STDOUT: !83 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !84 = !{!"omnipotent char", !83, i64 0} +// CHECK:STDOUT: !85 = !{!"any pointer", !84, i64 0} +// CHECK:STDOUT: !86 = !{!"p1 _ZTSSt16initializer_listIiE", !85, i64 0} +// CHECK:STDOUT: !87 = !{!86, !86, i64 0} +// CHECK:STDOUT: !88 = !{!"p1 _ZTS11vector_like", !85, i64 0} +// CHECK:STDOUT: !89 = !{!88, !88, i64 0} +// CHECK:STDOUT: !90 = !{!"int", !84, i64 0} +// CHECK:STDOUT: !91 = !{!"p1 int", !85, i64 0} +// CHECK:STDOUT: !93 = !{!91, !91, i64 0} +// CHECK:STDOUT: !94 = !{i64 0, i64 8, !93, i64 8, i64 8, !93} +// CHECK:STDOUT: !95 = !{!"p1 _ZTS15nontrivial_dtor", !85, i64 0} +// CHECK:STDOUT: !96 = !{!95, !95, i64 0} +// CHECK:STDOUT: !97 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !98 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !99 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !100 = !{!"__libc_errno", !90, i64 0} +// CHECK:STDOUT: !101 = !{!100, !90, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon index 9b4d87b6d2ec..aa4f7779a894 100644 --- a/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon +++ b/toolchain/lower/testdata/interop/cpp/std_initializer_list_pointer_size.carbon @@ -118,59 +118,52 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !32 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !38 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core"(ptr %self), !dbg !46 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !50 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !53 -// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !54 -// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !54 -// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !54 -// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !54 -// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !54 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 0, !dbg !54 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !54 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 8, !dbg !54 -// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !54 -// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !53 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !49 +// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !50 +// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !50 +// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !50 +// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !50 +// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !50 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 0, !dbg !50 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !50 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc18_36.3.temp, i32 0, i32 8, !dbg !50 +// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !50 +// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !49 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !52 +// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !50 +// CHECK:STDOUT: call void @"_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core"(ptr @array), !dbg !50 +// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -179,11 +172,11 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: %list.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %"class.std::initializer_list", align 8 -// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !92 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !94 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !94 -// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !92 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !101 +// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !88 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !90 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !90 +// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !88 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !97 // CHECK:STDOUT: %2 = getelementptr inbounds nuw { ptr, i64 }, ptr %agg.tmp, i32 0, i32 0 // CHECK:STDOUT: %3 = load ptr, ptr %2, align 8 // CHECK:STDOUT: %4 = getelementptr inbounds nuw { ptr, i64 }, ptr %agg.tmp, i32 0, i32 1 @@ -196,53 +189,53 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11vector_likeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !94 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !90 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !62 { +// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !63 -// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !63 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !64 -// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !64 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !64 -// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !64 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !64 -// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !64 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !64 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !63 -// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !63 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !63 -// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !63 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !59 +// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !59 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !60 +// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !60 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !60 +// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !60 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !60 +// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !60 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !60 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !59 +// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !59 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !59 +// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !59 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !62 +// CHECK:STDOUT: call void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !60 +// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !59 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr noundef %return) #1 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !103 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !103 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !99 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !99 // CHECK:STDOUT: call void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -251,37 +244,37 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !103 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !99 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %self), !dbg !70 +// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %self), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !76 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !78 // CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.71d86972d5684aff:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core"(ptr %self), !dbg !82 // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !84 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !86 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: @@ -297,7 +290,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: store ptr %list.coerce0, ptr %0, align 8 // CHECK:STDOUT: %1 = getelementptr inbounds nuw { ptr, i64 }, ptr %list, i32 0, i32 1 // CHECK:STDOUT: store i64 %list.coerce1, ptr %1, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !94 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !90 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -306,7 +299,7 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #2 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !103 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !99 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -321,8 +314,8 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!104, !105, !106, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!108} +// CHECK:STDOUT: !llvm.module.flags = !{!100, !101, !102, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!104} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -350,78 +343,74 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !6) // CHECK:STDOUT: !30 = !DILocation(line: 13, column: 42, scope: !28) // CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !6) // CHECK:STDOUT: !34 = !DILocation(line: 13, column: 42, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) -// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !6) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !10) // CHECK:STDOUT: !38 = !DILocation(line: 13, column: 42, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !10) // CHECK:STDOUT: !42 = !DILocation(line: 13, column: 42, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc7dedd104b837b2:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !10) -// CHECK:STDOUT: !46 = !DILocation(line: 13, column: 42, scope: !44) +// CHECK:STDOUT: !46 = !DILocation(line: 13, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !10) -// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 3, scope: !48) -// CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !52) -// CHECK:STDOUT: !54 = !DILocation(line: 18, column: 28, scope: !52) -// CHECK:STDOUT: !56 = !DILocation(line: 19, column: 3, scope: !52) -// CHECK:STDOUT: !57 = !DILocation(line: 17, column: 1, scope: !52) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !10) -// CHECK:STDOUT: !60 = !DILocation(line: 18, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !62) -// CHECK:STDOUT: !64 = !DILocation(line: 23, column: 58, scope: !62) -// CHECK:STDOUT: !66 = !DILocation(line: 24, column: 3, scope: !62) -// CHECK:STDOUT: !67 = !DILocation(line: 22, column: 1, scope: !62) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !23, line: 164, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !49 = !DILocation(line: 18, column: 3, scope: !48) +// CHECK:STDOUT: !50 = !DILocation(line: 18, column: 28, scope: !48) +// CHECK:STDOUT: !52 = !DILocation(line: 19, column: 3, scope: !48) +// CHECK:STDOUT: !53 = !DILocation(line: 17, column: 1, scope: !48) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !10) +// CHECK:STDOUT: !56 = !DILocation(line: 18, column: 3, scope: !54) +// CHECK:STDOUT: !57 = !{!55} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !59 = !DILocation(line: 23, column: 3, scope: !58) +// CHECK:STDOUT: !60 = !DILocation(line: 23, column: 58, scope: !58) +// CHECK:STDOUT: !62 = !DILocation(line: 24, column: 3, scope: !58) +// CHECK:STDOUT: !63 = !DILocation(line: 22, column: 1, scope: !58) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !23, line: 164, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !10) +// CHECK:STDOUT: !66 = !DILocation(line: 164, column: 19, scope: !64) +// CHECK:STDOUT: !67 = !{!65} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !10) -// CHECK:STDOUT: !70 = !DILocation(line: 164, column: 19, scope: !68) +// CHECK:STDOUT: !70 = !DILocation(line: 23, column: 58, scope: !68) // CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) // CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !10) // CHECK:STDOUT: !74 = !DILocation(line: 23, column: 58, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) // CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !10) // CHECK:STDOUT: !78 = !DILocation(line: 23, column: 58, scope: !76) // CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.71d86972d5684aff:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !10) -// CHECK:STDOUT: !82 = !DILocation(line: 23, column: 58, scope: !80) +// CHECK:STDOUT: !82 = !DILocation(line: 23, column: 3, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !10) -// CHECK:STDOUT: !86 = !DILocation(line: 23, column: 3, scope: !84) -// CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !89 = !{!"omnipotent char", !88, i64 0} -// CHECK:STDOUT: !90 = !{!"any pointer", !89, i64 0} -// CHECK:STDOUT: !91 = !{!"p1 _ZTSSt16initializer_listIiE", !90, i64 0} -// CHECK:STDOUT: !92 = !{!91, !91, i64 0} -// CHECK:STDOUT: !93 = !{!"p1 _ZTS11vector_like", !90, i64 0} -// CHECK:STDOUT: !94 = !{!93, !93, i64 0} -// CHECK:STDOUT: !95 = !{!"int", !89, i64 0} -// CHECK:STDOUT: !96 = !{!"p1 int", !90, i64 0} -// CHECK:STDOUT: !97 = !{!"long", !89, i64 0} -// CHECK:STDOUT: !99 = !{!96, !96, i64 0} -// CHECK:STDOUT: !100 = !{!97, !97, i64 0} -// CHECK:STDOUT: !101 = !{i64 0, i64 8, !99, i64 8, i64 8, !100} -// CHECK:STDOUT: !102 = !{!"p1 _ZTS15nontrivial_dtor", !90, i64 0} -// CHECK:STDOUT: !103 = !{!102, !102, i64 0} -// CHECK:STDOUT: !104 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !105 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !106 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !107 = !{!"__libc_errno", !95, i64 0} -// CHECK:STDOUT: !108 = !{!107, !95, i64 0} +// CHECK:STDOUT: !84 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !85 = !{!"omnipotent char", !84, i64 0} +// CHECK:STDOUT: !86 = !{!"any pointer", !85, i64 0} +// CHECK:STDOUT: !87 = !{!"p1 _ZTSSt16initializer_listIiE", !86, i64 0} +// CHECK:STDOUT: !88 = !{!87, !87, i64 0} +// CHECK:STDOUT: !89 = !{!"p1 _ZTS11vector_like", !86, i64 0} +// CHECK:STDOUT: !90 = !{!89, !89, i64 0} +// CHECK:STDOUT: !91 = !{!"int", !85, i64 0} +// CHECK:STDOUT: !92 = !{!"p1 int", !86, i64 0} +// CHECK:STDOUT: !93 = !{!"long", !85, i64 0} +// CHECK:STDOUT: !95 = !{!92, !92, i64 0} +// CHECK:STDOUT: !96 = !{!93, !93, i64 0} +// CHECK:STDOUT: !97 = !{i64 0, i64 8, !95, i64 8, i64 8, !96} +// CHECK:STDOUT: !98 = !{!"p1 _ZTS15nontrivial_dtor", !86, i64 0} +// CHECK:STDOUT: !99 = !{!98, !98, i64 0} +// CHECK:STDOUT: !100 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !101 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !102 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !103 = !{!"__libc_errno", !91, i64 0} +// CHECK:STDOUT: !104 = !{!103, !91, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/void.carbon b/toolchain/lower/testdata/interop/cpp/void.carbon index 6f5c4aa255d0..4baff41380da 100644 --- a/toolchain/lower/testdata/interop/cpp/void.carbon +++ b/toolchain/lower/testdata/interop/cpp/void.carbon @@ -97,216 +97,188 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !32 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core"(ptr %self), !dbg !38 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.14b4a412ddf73a96:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define void @_CPassIntPtr.Main(ptr %a) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !43 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365"(ptr %a), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !43 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !43 +// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !43 +// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !44 +// CHECK:STDOUT: call void @"_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core"(ptr %.loc11_21.2.temp), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.14b4a412ddf73a96:core.Destroy.Core"(ptr %self), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassIntPtr.Main(ptr %a) #0 !dbg !48 { +// CHECK:STDOUT: define void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !51 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365"(ptr %a), !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !51 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !51 -// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !51 -// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core"(ptr %.loc11_21.2.temp), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !54 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %a), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !54 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !54 +// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !54 +// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !55 +// CHECK:STDOUT: call void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %.loc15_27.2.temp), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d088c7eb746488be:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !57 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !62 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %a), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !62 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !62 -// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !62 -// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %.loc15_27.2.temp), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !64 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %self) #0 !dbg !66 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z19take_const_void_ptrPKv(ptr noundef) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core"(ptr %self), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core"(ptr %self), !dbg !76 // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !81 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %a), !dbg !81 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !81 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !81 +// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !81 +// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !82 +// CHECK:STDOUT: call void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %.loc19_27.2.temp), !dbg !81 +// CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %self) #0 !dbg !82 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7742c7b82efb7924:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %self), !dbg !84 -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dfb26e502f641cc5:core.Destroy.Core"(ptr %self) #0 !dbg !86 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !88 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %self) #0 !dbg !90 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dfb26e502f641cc5:core.Destroy.Core"(ptr %self), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !94 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !97 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %a), !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !97 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !97 -// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !97 -// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core"(ptr %.loc19_27.2.temp), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7742c7b82efb7924:core.Destroy.Core"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !103 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0532bac23645330a"(ptr %self) #0 !dbg !105 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642"(ptr %self), !dbg !110 -// CHECK:STDOUT: ret ptr %1, !dbg !111 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0532bac23645330a"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642"(ptr %self), !dbg !94 +// CHECK:STDOUT: ret ptr %1, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade"(ptr %self), !dbg !118 -// CHECK:STDOUT: ret ptr %1, !dbg !119 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade"(ptr %self), !dbg !102 +// CHECK:STDOUT: ret ptr %1, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %self) #0 !dbg !121 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea"(ptr %self), !dbg !126 -// CHECK:STDOUT: ret ptr %1, !dbg !127 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea"(ptr %self), !dbg !110 +// CHECK:STDOUT: ret ptr %1, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642"(ptr %self) #0 !dbg !137 { -// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %self), !dbg !143 -// CHECK:STDOUT: ret ptr %1, !dbg !144 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642"(ptr %self) #0 !dbg !121 { +// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %self), !dbg !127 +// CHECK:STDOUT: ret ptr %1, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade"(ptr %self) #0 !dbg !146 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !151 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !151 -// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !151 -// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !151 -// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %1), !dbg !152 -// CHECK:STDOUT: call void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %temp), !dbg !151 -// CHECK:STDOUT: ret ptr %2, !dbg !153 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade"(ptr %self) #0 !dbg !130 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !135 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !135 +// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !135 +// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !135 +// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %1), !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %temp), !dbg !135 +// CHECK:STDOUT: ret ptr %2, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea"(ptr %self) #0 !dbg !155 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !160 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !160 -// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba"(ptr %self), !dbg !160 -// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !160 -// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !160 -// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.e4523e01ac2590ba(ptr %2), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %temp), !dbg !160 -// CHECK:STDOUT: ret ptr %3, !dbg !162 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !144 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !144 +// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba"(ptr %self), !dbg !144 +// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !144 +// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !144 +// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.e4523e01ac2590ba(ptr %2), !dbg !145 +// CHECK:STDOUT: call void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %temp), !dbg !144 +// CHECK:STDOUT: ret ptr %3, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %value) #0 !dbg !173 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %value), !dbg !178 -// CHECK:STDOUT: ret ptr %1, !dbg !179 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.4201ec9a263c5642(ptr %value) #0 !dbg !157 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %value), !dbg !162 +// CHECK:STDOUT: ret ptr %1, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba"(ptr %self) #3 !dbg !182 { -// CHECK:STDOUT: ret ptr %self, !dbg !185 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba"(ptr %self) #3 !dbg !166 { +// CHECK:STDOUT: ret ptr %self, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.e4523e01ac2590ba(ptr %value) #0 !dbg !187 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %value), !dbg !192 -// CHECK:STDOUT: ret ptr %1, !dbg !193 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.e4523e01ac2590ba(ptr %value) #0 !dbg !171 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %value), !dbg !176 +// CHECK:STDOUT: ret ptr %1, !dbg !177 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %self) #0 !dbg !200 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !205 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !205 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !205 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !209 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !207 -// CHECK:STDOUT: call void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %1), !dbg !205 -// CHECK:STDOUT: ret ptr %2, !dbg !211 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %self) #0 !dbg !184 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !189 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !189 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !189 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !193 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !191 +// CHECK:STDOUT: call void @"_CSelfDestruct.174120d4d03791b0:core.Destroy.Core"(ptr %1), !dbg !189 +// CHECK:STDOUT: ret ptr %2, !dbg !195 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %self) #0 !dbg !213 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !218 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !218 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !218 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !222 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !220 -// CHECK:STDOUT: call void @"_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %1), !dbg !218 -// CHECK:STDOUT: ret ptr %2, !dbg !224 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %self) #0 !dbg !197 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !202 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !202 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !202 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !206 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !204 +// CHECK:STDOUT: call void @"_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core"(ptr %1), !dbg !202 +// CHECK:STDOUT: ret ptr %2, !dbg !208 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -320,8 +292,8 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!226, !227, !228, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!233} +// CHECK:STDOUT: !llvm.module.flags = !{!210, !211, !212, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!217} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -351,145 +323,129 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !7) // CHECK:STDOUT: !30 = !DILocation(line: 7, column: 21, scope: !28) // CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !7) // CHECK:STDOUT: !34 = !DILocation(line: 7, column: 21, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.174120d4d03791b0:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !7) // CHECK:STDOUT: !38 = !DILocation(line: 7, column: 21, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.14b4a412ddf73a96:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !4, line: 10, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !7) -// CHECK:STDOUT: !42 = !DILocation(line: 7, column: 21, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.14b4a412ddf73a96:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !7) -// CHECK:STDOUT: !46 = !DILocation(line: 7, column: 21, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !4, line: 10, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !7) -// CHECK:STDOUT: !51 = !DILocation(line: 11, column: 21, scope: !48) -// CHECK:STDOUT: !52 = !DILocation(line: 11, column: 3, scope: !48) -// CHECK:STDOUT: !53 = !DILocation(line: 10, column: 1, scope: !48) -// CHECK:STDOUT: !54 = !{!49} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !7) -// CHECK:STDOUT: !57 = !DILocation(line: 164, column: 19, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !7) -// CHECK:STDOUT: !62 = !DILocation(line: 15, column: 27, scope: !59) -// CHECK:STDOUT: !63 = !DILocation(line: 15, column: 3, scope: !59) -// CHECK:STDOUT: !64 = !DILocation(line: 14, column: 1, scope: !59) -// CHECK:STDOUT: !65 = !{!60} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !43 = !DILocation(line: 11, column: 21, scope: !40) +// CHECK:STDOUT: !44 = !DILocation(line: 11, column: 3, scope: !40) +// CHECK:STDOUT: !45 = !DILocation(line: 10, column: 1, scope: !40) +// CHECK:STDOUT: !46 = !{!41} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d088c7eb746488be:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !7) +// CHECK:STDOUT: !49 = !DILocation(line: 164, column: 19, scope: !47) +// CHECK:STDOUT: !50 = !{!48} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) +// CHECK:STDOUT: !54 = !DILocation(line: 15, column: 27, scope: !51) +// CHECK:STDOUT: !55 = !DILocation(line: 15, column: 3, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 14, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !7) +// CHECK:STDOUT: !60 = !DILocation(line: 164, column: 19, scope: !58) +// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !7) +// CHECK:STDOUT: !64 = !DILocation(line: 15, column: 27, scope: !62) +// CHECK:STDOUT: !65 = !{!63} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !7) -// CHECK:STDOUT: !68 = !DILocation(line: 164, column: 19, scope: !66) +// CHECK:STDOUT: !68 = !DILocation(line: 15, column: 27, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8d3ff16138365f48:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !7) // CHECK:STDOUT: !72 = !DILocation(line: 15, column: 27, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !7) // CHECK:STDOUT: !76 = !DILocation(line: 15, column: 27, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4e1f0f3b7725eea2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !7) -// CHECK:STDOUT: !80 = !DILocation(line: 15, column: 27, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4e1f0f3b7725eea2:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !7) -// CHECK:STDOUT: !84 = !DILocation(line: 15, column: 27, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dfb26e502f641cc5:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !7) -// CHECK:STDOUT: !88 = !DILocation(line: 15, column: 27, scope: !86) -// CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dfb26e502f641cc5:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !7) -// CHECK:STDOUT: !92 = !DILocation(line: 15, column: 27, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !7) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 27, scope: !94) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 3, scope: !94) -// CHECK:STDOUT: !99 = !DILocation(line: 18, column: 1, scope: !94) -// CHECK:STDOUT: !100 = !{!95} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7742c7b82efb7924:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !7) -// CHECK:STDOUT: !103 = !DILocation(line: 164, column: 19, scope: !101) -// CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0532bac23645330a", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) +// CHECK:STDOUT: !81 = !DILocation(line: 19, column: 27, scope: !78) +// CHECK:STDOUT: !82 = !DILocation(line: 19, column: 3, scope: !78) +// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 1, scope: !78) +// CHECK:STDOUT: !84 = !{!79} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7742c7b82efb7924:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) +// CHECK:STDOUT: !87 = !DILocation(line: 164, column: 19, scope: !85) +// CHECK:STDOUT: !88 = !{!86} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.0532bac23645330a", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !7) +// CHECK:STDOUT: !94 = !DILocation(line: 106, column: 12, scope: !89) +// CHECK:STDOUT: !95 = !DILocation(line: 106, column: 5, scope: !89) +// CHECK:STDOUT: !96 = !{!90} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !7) +// CHECK:STDOUT: !102 = !DILocation(line: 106, column: 12, scope: !97) +// CHECK:STDOUT: !103 = !DILocation(line: 106, column: 5, scope: !97) +// CHECK:STDOUT: !104 = !{!98} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !7) // CHECK:STDOUT: !110 = !DILocation(line: 106, column: 12, scope: !105) // CHECK:STDOUT: !111 = !DILocation(line: 106, column: 5, scope: !105) // CHECK:STDOUT: !112 = !{!106} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.6031252d10ea5365", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !7) -// CHECK:STDOUT: !118 = !DILocation(line: 106, column: 12, scope: !113) -// CHECK:STDOUT: !119 = !DILocation(line: 106, column: 5, scope: !113) -// CHECK:STDOUT: !120 = !{!114} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.d72303bab6c7803c", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642", scope: null, file: !19, line: 80, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) // CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !7) -// CHECK:STDOUT: !126 = !DILocation(line: 106, column: 12, scope: !121) -// CHECK:STDOUT: !127 = !DILocation(line: 106, column: 5, scope: !121) -// CHECK:STDOUT: !128 = !{!122} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.4201ec9a263c5642", scope: null, file: !19, line: 80, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !145) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !7) -// CHECK:STDOUT: !143 = !DILocation(line: 81, column: 12, scope: !137) -// CHECK:STDOUT: !144 = !DILocation(line: 81, column: 5, scope: !137) -// CHECK:STDOUT: !145 = !{!138} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !154) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !7) -// CHECK:STDOUT: !151 = !DILocation(line: 88, column: 29, scope: !146) -// CHECK:STDOUT: !152 = !DILocation(line: 88, column: 12, scope: !146) -// CHECK:STDOUT: !153 = !DILocation(line: 88, column: 5, scope: !146) -// CHECK:STDOUT: !154 = !{!147} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !163) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !7) -// CHECK:STDOUT: !160 = !DILocation(line: 88, column: 29, scope: !155) -// CHECK:STDOUT: !161 = !DILocation(line: 88, column: 12, scope: !155) -// CHECK:STDOUT: !162 = !DILocation(line: 88, column: 5, scope: !155) -// CHECK:STDOUT: !163 = !{!156} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.4201ec9a263c5642", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !180) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !7) -// CHECK:STDOUT: !178 = !DILocation(line: 34, column: 12, scope: !173) -// CHECK:STDOUT: !179 = !DILocation(line: 34, column: 5, scope: !173) -// CHECK:STDOUT: !180 = !{!174} -// CHECK:STDOUT: !181 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") -// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba", scope: null, file: !181, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !186) -// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !7) -// CHECK:STDOUT: !185 = !DILocation(line: 40, column: 3, scope: !182) -// CHECK:STDOUT: !186 = !{!183} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e4523e01ac2590ba", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !194) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !7) -// CHECK:STDOUT: !192 = !DILocation(line: 34, column: 12, scope: !187) -// CHECK:STDOUT: !193 = !DILocation(line: 34, column: 5, scope: !187) -// CHECK:STDOUT: !194 = !{!188} -// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !212) -// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !7) -// CHECK:STDOUT: !205 = !DILocation(line: 167, column: 14, scope: !200) -// CHECK:STDOUT: !207 = !DILocation(line: 167, column: 18, scope: !200) -// CHECK:STDOUT: !209 = !DILocation(line: 169, column: 5, scope: !200) -// CHECK:STDOUT: !211 = !DILocation(line: 170, column: 5, scope: !200) -// CHECK:STDOUT: !212 = !{!201} -// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !225) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !7) -// CHECK:STDOUT: !218 = !DILocation(line: 167, column: 14, scope: !213) -// CHECK:STDOUT: !220 = !DILocation(line: 167, column: 18, scope: !213) -// CHECK:STDOUT: !222 = !DILocation(line: 169, column: 5, scope: !213) -// CHECK:STDOUT: !224 = !DILocation(line: 170, column: 5, scope: !213) -// CHECK:STDOUT: !225 = !{!214} -// CHECK:STDOUT: !226 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !227 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !228 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !229 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !230 = !{!"omnipotent char", !229, i64 0} -// CHECK:STDOUT: !231 = !{!"int", !230, i64 0} -// CHECK:STDOUT: !232 = !{!"__libc_errno", !231, i64 0} -// CHECK:STDOUT: !233 = !{!232, !231, i64 0} +// CHECK:STDOUT: !127 = !DILocation(line: 81, column: 12, scope: !121) +// CHECK:STDOUT: !128 = !DILocation(line: 81, column: 5, scope: !121) +// CHECK:STDOUT: !129 = !{!122} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.1e16d6a5a3286ade", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !138) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !7) +// CHECK:STDOUT: !135 = !DILocation(line: 88, column: 29, scope: !130) +// CHECK:STDOUT: !136 = !DILocation(line: 88, column: 12, scope: !130) +// CHECK:STDOUT: !137 = !DILocation(line: 88, column: 5, scope: !130) +// CHECK:STDOUT: !138 = !{!131} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.ea6f599e1a77a7ea", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !7) +// CHECK:STDOUT: !144 = !DILocation(line: 88, column: 29, scope: !139) +// CHECK:STDOUT: !145 = !DILocation(line: 88, column: 12, scope: !139) +// CHECK:STDOUT: !146 = !DILocation(line: 88, column: 5, scope: !139) +// CHECK:STDOUT: !147 = !{!140} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.4201ec9a263c5642", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !7) +// CHECK:STDOUT: !162 = !DILocation(line: 34, column: 12, scope: !157) +// CHECK:STDOUT: !163 = !DILocation(line: 34, column: 5, scope: !157) +// CHECK:STDOUT: !164 = !{!158} +// CHECK:STDOUT: !165 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.a569d188b7ffe592.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.84588f41d61dafba", scope: null, file: !165, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !170) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !7) +// CHECK:STDOUT: !169 = !DILocation(line: 40, column: 3, scope: !166) +// CHECK:STDOUT: !170 = !{!167} +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.e4523e01ac2590ba", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !178) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !7) +// CHECK:STDOUT: !176 = !DILocation(line: 34, column: 12, scope: !171) +// CHECK:STDOUT: !177 = !DILocation(line: 34, column: 5, scope: !171) +// CHECK:STDOUT: !178 = !{!172} +// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !196) +// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !7) +// CHECK:STDOUT: !189 = !DILocation(line: 167, column: 14, scope: !184) +// CHECK:STDOUT: !191 = !DILocation(line: 167, column: 18, scope: !184) +// CHECK:STDOUT: !193 = !DILocation(line: 169, column: 5, scope: !184) +// CHECK:STDOUT: !195 = !DILocation(line: 170, column: 5, scope: !184) +// CHECK:STDOUT: !196 = !{!185} +// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !209) +// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !7) +// CHECK:STDOUT: !202 = !DILocation(line: 167, column: 14, scope: !197) +// CHECK:STDOUT: !204 = !DILocation(line: 167, column: 18, scope: !197) +// CHECK:STDOUT: !206 = !DILocation(line: 169, column: 5, scope: !197) +// CHECK:STDOUT: !208 = !DILocation(line: 170, column: 5, scope: !197) +// CHECK:STDOUT: !209 = !{!198} +// CHECK:STDOUT: !210 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !211 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !212 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !213 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !214 = !{!"omnipotent char", !213, i64 0} +// CHECK:STDOUT: !215 = !{!"int", !214, i64 0} +// CHECK:STDOUT: !216 = !{!"__libc_errno", !215, i64 0} +// CHECK:STDOUT: !217 = !{!216, !215, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'receive.carbon' @@ -498,38 +454,38 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %self) #0 !dbg !238 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %self) #0 !dbg !222 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !240 +// CHECK:STDOUT: ret void, !dbg !224 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReceiveVoidPtr.Main() #0 !dbg !242 { +// CHECK:STDOUT: define ptr @_CReceiveVoidPtr.Main() #0 !dbg !226 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %return_void_ptr.call = call ptr @_Z15return_void_ptrv(), !dbg !245 -// CHECK:STDOUT: ret ptr %return_void_ptr.call, !dbg !246 +// CHECK:STDOUT: %return_void_ptr.call = call ptr @_Z15return_void_ptrv(), !dbg !229 +// CHECK:STDOUT: ret ptr %return_void_ptr.call, !dbg !230 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z15return_void_ptrv() #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CConvertFromVoidPtr.Main(ptr %p) #0 !dbg !247 { +// CHECK:STDOUT: define ptr @_CConvertFromVoidPtr.Main(ptr %p) #0 !dbg !231 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %p, !dbg !253 +// CHECK:STDOUT: ret ptr %p, !dbg !237 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CConvertFromConstVoidPtr.Main(ptr %p) #0 !dbg !255 { +// CHECK:STDOUT: define ptr @_CConvertFromConstVoidPtr.Main(ptr %p) #0 !dbg !239 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %p, !dbg !261 +// CHECK:STDOUT: ret ptr %p, !dbg !245 // CHECK:STDOUT: } // CHECK:STDOUT: // 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.dbg.cu = !{!235} -// CHECK:STDOUT: !llvm.module.flags = !{!226, !227, !228, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!233} +// CHECK:STDOUT: !llvm.dbg.cu = !{!219} +// CHECK:STDOUT: !llvm.module.flags = !{!210, !211, !212, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!217} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -539,31 +495,31 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !14 = !{!7, !7} // CHECK:STDOUT: !15 = !DISubroutineType(types: !14) // CHECK:STDOUT: !19 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !226 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !227 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !228 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !229 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !230 = !{!"omnipotent char", !229, i64 0} -// CHECK:STDOUT: !231 = !{!"int", !230, i64 0} -// CHECK:STDOUT: !232 = !{!"__libc_errno", !231, i64 0} -// CHECK:STDOUT: !233 = !{!232, !231, i64 0} -// CHECK:STDOUT: !234 = !DIFile(filename: "receive.carbon", directory: "") -// CHECK:STDOUT: !235 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !234, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !236 = !{!7} -// CHECK:STDOUT: !237 = !DISubroutineType(types: !236) -// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !235, retainedNodes: !241) -// CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !7) -// CHECK:STDOUT: !240 = !DILocation(line: 164, column: 19, scope: !238) -// CHECK:STDOUT: !241 = !{!239} -// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !234, line: 6, type: !237, spFlags: DISPFlagDefinition, unit: !235) -// CHECK:STDOUT: !245 = !DILocation(line: 7, column: 10, scope: !242) -// CHECK:STDOUT: !246 = !DILocation(line: 7, column: 3, scope: !242) -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !234, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !235, retainedNodes: !254) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !7) -// CHECK:STDOUT: !253 = !DILocation(line: 11, column: 3, scope: !247) -// CHECK:STDOUT: !254 = !{!248} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !234, line: 14, type: !15, spFlags: DISPFlagDefinition, unit: !235, retainedNodes: !262) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !7) -// CHECK:STDOUT: !261 = !DILocation(line: 15, column: 3, scope: !255) -// CHECK:STDOUT: !262 = !{!256} +// CHECK:STDOUT: !210 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !211 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !212 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !213 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !214 = !{!"omnipotent char", !213, i64 0} +// CHECK:STDOUT: !215 = !{!"int", !214, i64 0} +// CHECK:STDOUT: !216 = !{!"__libc_errno", !215, i64 0} +// CHECK:STDOUT: !217 = !{!216, !215, i64 0} +// CHECK:STDOUT: !218 = !DIFile(filename: "receive.carbon", directory: "") +// CHECK:STDOUT: !219 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !218, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !220 = !{!7} +// CHECK:STDOUT: !221 = !DISubroutineType(types: !220) +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !225) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !7) +// CHECK:STDOUT: !224 = !DILocation(line: 164, column: 19, scope: !222) +// CHECK:STDOUT: !225 = !{!223} +// CHECK:STDOUT: !226 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !218, line: 6, type: !221, spFlags: DISPFlagDefinition, unit: !219) +// CHECK:STDOUT: !229 = !DILocation(line: 7, column: 10, scope: !226) +// CHECK:STDOUT: !230 = !DILocation(line: 7, column: 3, scope: !226) +// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !218, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !238) +// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !7) +// CHECK:STDOUT: !237 = !DILocation(line: 11, column: 3, scope: !231) +// CHECK:STDOUT: !238 = !{!232} +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !218, line: 14, type: !15, spFlags: DISPFlagDefinition, unit: !219, retainedNodes: !246) +// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !7) +// CHECK:STDOUT: !245 = !DILocation(line: 15, column: 3, scope: !239) +// CHECK:STDOUT: !246 = !{!240} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/copy_value_rep.carbon b/toolchain/lower/testdata/let/copy_value_rep.carbon index c9f5d47f2c88..7608175af4a0 100644 --- a/toolchain/lower/testdata/let/copy_value_rep.carbon +++ b/toolchain/lower/testdata/let/copy_value_rep.carbon @@ -50,44 +50,37 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -122,28 +115,24 @@ fn Run() -> i32 { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 18, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !25) // CHECK:STDOUT: !50 = !DILocation(line: 18, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !25) // CHECK:STDOUT: !54 = !DILocation(line: 18, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !25) // CHECK:STDOUT: !58 = !DILocation(line: 18, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !25) // CHECK:STDOUT: !62 = !DILocation(line: 18, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !25) -// CHECK:STDOUT: !66 = !DILocation(line: 18, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index 1ed5706c9fa1..e82f7d101bc8 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -84,44 +84,37 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !66 // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -164,28 +157,24 @@ fn F() -> i32 { // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 15, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) // CHECK:STDOUT: !50 = !DILocation(line: 15, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !25) // CHECK:STDOUT: !54 = !DILocation(line: 15, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !25) // CHECK:STDOUT: !58 = !DILocation(line: 15, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !25) -// CHECK:STDOUT: !62 = !DILocation(line: 15, column: 3, scope: !60) +// CHECK:STDOUT: !62 = !DILocation(line: 14, column: 3, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !25) // CHECK:STDOUT: !66 = !DILocation(line: 14, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !25) -// CHECK:STDOUT: !70 = !DILocation(line: 14, column: 3, scope: !68) -// CHECK:STDOUT: !71 = !{!69} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/operators/assignment.carbon b/toolchain/lower/testdata/operators/assignment.carbon index a3bdc58304b5..1d8f735b7c51 100644 --- a/toolchain/lower/testdata/operators/assignment.carbon +++ b/toolchain/lower/testdata/operators/assignment.carbon @@ -47,51 +47,44 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !49 +// CHECK:STDOUT: %tuple.elem0.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !52 +// CHECK:STDOUT: %tuple.elem1.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !52 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.102.loc21_5, i64 8, i1 false), !dbg !51 +// CHECK:STDOUT: %tuple.elem0.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !53 +// CHECK:STDOUT: %.loc22_10.1 = load i32, ptr %tuple.elem0.loc22_10.1.tuple.elem, align 4, !dbg !53 +// CHECK:STDOUT: %tuple.elem0.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !53 +// CHECK:STDOUT: store i32 %.loc22_10.1, ptr %tuple.elem0.loc22_10.2.tuple.elem, align 4, !dbg !53 +// CHECK:STDOUT: %tuple.elem1.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: %.loc22_10.3 = load i32, ptr %tuple.elem1.loc22_10.1.tuple.elem, align 4, !dbg !53 +// CHECK:STDOUT: %tuple.elem1.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: store i32 %.loc22_10.3, ptr %tuple.elem1.loc22_10.2.tuple.elem, align 4, !dbg !53 +// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %b.var), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !53 -// CHECK:STDOUT: %tuple.elem0.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !56 -// CHECK:STDOUT: %tuple.elem1.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !56 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.102.loc21_5, i64 8, i1 false), !dbg !55 -// CHECK:STDOUT: %tuple.elem0.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !57 -// CHECK:STDOUT: %.loc22_10.1 = load i32, ptr %tuple.elem0.loc22_10.1.tuple.elem, align 4, !dbg !57 -// CHECK:STDOUT: %tuple.elem0.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !57 -// CHECK:STDOUT: store i32 %.loc22_10.1, ptr %tuple.elem0.loc22_10.2.tuple.elem, align 4, !dbg !57 -// CHECK:STDOUT: %tuple.elem1.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !57 -// CHECK:STDOUT: %.loc22_10.3 = load i32, ptr %tuple.elem1.loc22_10.1.tuple.elem, align 4, !dbg !57 -// CHECK:STDOUT: %tuple.elem1.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !57 -// CHECK:STDOUT: store i32 %.loc22_10.3, ptr %tuple.elem1.loc22_10.2.tuple.elem, align 4, !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %b.var), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -130,26 +123,22 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 14, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 14, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) -// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 3, scope: !46) -// CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 19, type: !27, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 3, scope: !50) -// CHECK:STDOUT: !55 = !DILocation(line: 21, column: 3, scope: !50) -// CHECK:STDOUT: !56 = !DILocation(line: 21, column: 7, scope: !50) -// CHECK:STDOUT: !57 = !DILocation(line: 22, column: 10, scope: !50) -// CHECK:STDOUT: !58 = !DILocation(line: 22, column: 3, scope: !50) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 19, type: !27, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 3, scope: !46) +// CHECK:STDOUT: !51 = !DILocation(line: 21, column: 3, scope: !46) +// CHECK:STDOUT: !52 = !DILocation(line: 21, column: 7, scope: !46) +// CHECK:STDOUT: !53 = !DILocation(line: 22, column: 10, scope: !46) +// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 3, scope: !46) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !25) +// CHECK:STDOUT: !57 = !DILocation(line: 20, column: 3, scope: !55) +// CHECK:STDOUT: !58 = !{!56} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !25) // CHECK:STDOUT: !61 = !DILocation(line: 20, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !25) -// CHECK:STDOUT: !65 = !DILocation(line: 20, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/operators/increment.carbon b/toolchain/lower/testdata/operators/increment.carbon index fe05a34f759d..4c8c364db785 100644 --- a/toolchain/lower/testdata/operators/increment.carbon +++ b/toolchain/lower/testdata/operators/increment.carbon @@ -41,45 +41,38 @@ fn IncrSigned() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !21 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !21 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !25 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !27 -// CHECK:STDOUT: ret void, !dbg !27 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !30 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !33 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !26 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 1), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !38 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !41 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !42 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !42 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895"(ptr %self, i32 %other) #2 !dbg !34 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %other), !dbg !37 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !38 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !38 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !46 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !51 -// CHECK:STDOUT: ret i32 %1, !dbg !53 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !42 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !47 +// CHECK:STDOUT: ret i32 %1, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !55 { -// CHECK:STDOUT: ret i32 %self, !dbg !61 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !51 { +// CHECK:STDOUT: ret i32 %self, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -106,37 +99,33 @@ fn IncrSigned() { // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !17, type: !6) // CHECK:STDOUT: !19 = !DILocation(line: 5, column: 3, scope: !17) // CHECK:STDOUT: !20 = !{!18} -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !6) // CHECK:STDOUT: !23 = !DILocation(line: 5, column: 3, scope: !21) // CHECK:STDOUT: !24 = !{!22} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !6) -// CHECK:STDOUT: !27 = !DILocation(line: 5, column: 3, scope: !25) -// CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !29, line: 396, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !6) -// CHECK:STDOUT: !33 = !DILocation(line: 398, column: 5, scope: !30) -// CHECK:STDOUT: !34 = !{null, !6, !6} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !DILocation(line: 396, column: 3, scope: !30) -// CHECK:STDOUT: !37 = !{!31} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !29, line: 331, type: !35, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !6) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 2, scope: !38, type: !6) -// CHECK:STDOUT: !41 = !DILocation(line: 0, scope: !38) -// CHECK:STDOUT: !42 = !DILocation(line: 331, column: 3, scope: !38) -// CHECK:STDOUT: !43 = !{!6, !6} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !{!39, !40} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !29, line: 64, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !6) -// CHECK:STDOUT: !51 = !DILocation(line: 66, column: 17, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 66, column: 5, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !29, line: 59, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !6) -// CHECK:STDOUT: !61 = !DILocation(line: 59, column: 28, scope: !55) -// CHECK:STDOUT: !62 = !{!56} +// CHECK:STDOUT: !25 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !25, line: 396, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !6) +// CHECK:STDOUT: !29 = !DILocation(line: 398, column: 5, scope: !26) +// CHECK:STDOUT: !30 = !{null, !6, !6} +// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) +// CHECK:STDOUT: !32 = !DILocation(line: 396, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !{!27} +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.39e2e78a3c2e036d.Core:Int.9452f4c51951679b.Core:AddAssignWith.bcc2a64c00f3554f.Core.83481f1872d67895", scope: null, file: !25, line: 331, type: !31, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !6) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 2, scope: !34, type: !6) +// CHECK:STDOUT: !37 = !DILocation(line: 0, scope: !34) +// CHECK:STDOUT: !38 = !DILocation(line: 331, column: 3, scope: !34) +// CHECK:STDOUT: !39 = !{!6, !6} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !{!35, !36} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !25, line: 64, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !6) +// CHECK:STDOUT: !47 = !DILocation(line: 66, column: 17, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 66, column: 5, scope: !42) +// CHECK:STDOUT: !50 = !{!43} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !25, line: 59, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !6) +// CHECK:STDOUT: !57 = !DILocation(line: 59, column: 28, scope: !51) +// CHECK:STDOUT: !58 = !{!52} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/imported_type_completeness.carbon b/toolchain/lower/testdata/packages/imported_type_completeness.carbon index b69183d65c75..dbb7f7a03325 100644 --- a/toolchain/lower/testdata/packages/imported_type_completeness.carbon +++ b/toolchain/lower/testdata/packages/imported_type_completeness.carbon @@ -139,42 +139,35 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr %self) #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr %self), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e43630e9a6c38c3f() #0 !dbg !48 { -// CHECK:STDOUT: %temp = alloca {}, align 1, !dbg !50 -// CHECK:STDOUT: %temp1 = alloca {}, align 1, !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !50 -// CHECK:STDOUT: %1 = call i123 @_CF.C.Main.e43630e9a6c38c3f(), !dbg !51 +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e43630e9a6c38c3f() #0 !dbg !44 { +// CHECK:STDOUT: %temp = alloca {}, align 1, !dbg !46 +// CHECK:STDOUT: %temp1 = alloca {}, align 1, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !46 +// CHECK:STDOUT: %1 = call i123 @_CF.C.Main.e43630e9a6c38c3f(), !dbg !47 +// CHECK:STDOUT: call void @"_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr @C.val.eeb), !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !50 +// CHECK:STDOUT: %2 = call i456 @_CG.C.Main.e43630e9a6c38c3f(), !dbg !52 // CHECK:STDOUT: call void @"_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr @C.val.eeb), !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !54 -// CHECK:STDOUT: %2 = call i456 @_CG.C.Main.e43630e9a6c38c3f(), !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core"(ptr @C.val.eeb), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i123 @_CF.C.Main.e43630e9a6c38c3f() #0 !dbg !60 { -// CHECK:STDOUT: ret i123 123, !dbg !63 +// CHECK:STDOUT: define linkonce_odr i123 @_CF.C.Main.e43630e9a6c38c3f() #0 !dbg !56 { +// CHECK:STDOUT: ret i123 123, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i456 @_CG.C.Main.e43630e9a6c38c3f() #0 !dbg !64 { -// CHECK:STDOUT: ret i456 456, !dbg !68 +// CHECK:STDOUT: define linkonce_odr i456 @_CG.C.Main.e43630e9a6c38c3f() #0 !dbg !60 { +// CHECK:STDOUT: ret i456 456, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -205,40 +198,36 @@ fn CallF() { // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !22) // CHECK:STDOUT: !38 = !DILocation(line: 19, column: 4, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b7a0a8bb33ac84ff:core.Destroy.Core", scope: null, file: !18, line: 19, type: !24, spFlags: DISPFlagDefinition, unit: !30, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core", scope: null, file: !18, line: 19, type: !24, spFlags: DISPFlagDefinition, unit: !30, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !22) // CHECK:STDOUT: !42 = !DILocation(line: 19, column: 4, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b7a0a8bb33ac84ff:core.Destroy.Core", scope: null, file: !18, line: 19, type: !24, spFlags: DISPFlagDefinition, unit: !30, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !22) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !30) // CHECK:STDOUT: !46 = !DILocation(line: 19, column: 4, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 16, type: !32, spFlags: DISPFlagDefinition, unit: !30) -// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 4, scope: !48) -// CHECK:STDOUT: !51 = !DILocation(line: 19, column: 3, scope: !48) -// CHECK:STDOUT: !52 = !{!20} -// CHECK:STDOUT: !53 = !DISubroutineType(types: !52) -// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 4, scope: !48) -// CHECK:STDOUT: !56 = !DILocation(line: 22, column: 3, scope: !48) -// CHECK:STDOUT: !57 = !{!21} -// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) -// CHECK:STDOUT: !59 = !DILocation(line: 16, column: 1, scope: !48) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 6, type: !53, spFlags: DISPFlagDefinition, unit: !30) -// CHECK:STDOUT: !63 = !DILocation(line: 7, column: 5, scope: !60) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 11, type: !58, spFlags: DISPFlagDefinition, unit: !30) -// CHECK:STDOUT: !68 = !DILocation(line: 12, column: 5, scope: !64) +// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 3, scope: !44) +// CHECK:STDOUT: !48 = !{!20} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = !DILocation(line: 22, column: 4, scope: !44) +// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !44) +// CHECK:STDOUT: !53 = !{!21} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !55 = !DILocation(line: 16, column: 1, scope: !44) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !30) +// CHECK:STDOUT: !59 = !DILocation(line: 7, column: 5, scope: !56) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 11, type: !54, spFlags: DISPFlagDefinition, unit: !30) +// CHECK:STDOUT: !64 = !DILocation(line: 12, column: 5, scope: !60) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'require_completion_in_vtable.carbon' // CHECK:STDOUT: source_filename = "require_completion_in_vtable.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!70} +// CHECK:STDOUT: !llvm.dbg.cu = !{!66} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !69 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") -// CHECK:STDOUT: !70 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !69, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !65 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !66 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !65, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_vtable.carbon' @@ -250,10 +239,10 @@ fn CallF() { // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !75 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 @_Cv.Main, ptr align 8 @C.val.loc9_1, i64 8, i1 false), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 @_Cv.Main, ptr align 8 @C.val.loc9_1, i64 8, i1 false), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -262,45 +251,45 @@ fn CallF() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!74} +// CHECK:STDOUT: !llvm.dbg.cu = !{!70} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !31 = !{null} // CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// CHECK:STDOUT: !73 = !DIFile(filename: "use_without_completion_in_vtable.carbon", directory: "") -// CHECK:STDOUT: !74 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !73, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !73, type: !32, spFlags: DISPFlagDefinition, unit: !74) -// CHECK:STDOUT: !76 = !DILocation(line: 9, column: 1, scope: !75) -// CHECK:STDOUT: !77 = !DILocation(line: 0, scope: !75) +// CHECK:STDOUT: !69 = !DIFile(filename: "use_without_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !70 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !69, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !69, type: !32, spFlags: DISPFlagDefinition, unit: !70) +// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 1, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 0, scope: !71) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'require_completion_in_virtual_call.carbon' // CHECK:STDOUT: source_filename = "require_completion_in_virtual_call.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !80 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !84 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !84 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !86 // CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !88 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !90 -// CHECK:STDOUT: ret void, !dbg !90 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!75} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -308,20 +297,20 @@ fn CallF() { // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !23 = !{null, !22} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !78 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") -// CHECK:STDOUT: !79 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !78, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !83) +// CHECK:STDOUT: !74 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !75 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !74, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !79) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !22) +// CHECK:STDOUT: !78 = !DILocation(line: 7, column: 3, scope: !76) +// CHECK:STDOUT: !79 = !{!77} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !83) // CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !22) // CHECK:STDOUT: !82 = !DILocation(line: 7, column: 3, scope: !80) // CHECK:STDOUT: !83 = !{!81} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !87) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !87) // CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !22) // CHECK:STDOUT: !86 = !DILocation(line: 7, column: 3, scope: !84) // CHECK:STDOUT: !87 = !{!85} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !91) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !22) -// CHECK:STDOUT: !90 = !DILocation(line: 7, column: 3, scope: !88) -// CHECK:STDOUT: !91 = !{!89} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_virtual_call.carbon' @@ -333,99 +322,92 @@ fn CallF() { // CHECK:STDOUT: @C.val.9ff.anon = internal constant { ptr } { ptr @"_CC.Main.$vtable.9522ff908e97e267" } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !94 { +// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !90 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_9.2.temp = alloca {}, align 1, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_9.2.temp), !dbg !95 -// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr @C.val.d1d.loc9_11.3), !dbg !96 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val.d1d), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: %.loc9_9.2.temp = alloca {}, align 1, !dbg !91 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_9.2.temp), !dbg !91 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr @C.val.d1d.loc9_11.3), !dbg !92 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val.d1d), !dbg !91 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !98 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !94 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !98 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !102 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !102 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !108 // CHECK:STDOUT: ret void, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !110 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !112 // CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !114 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.119330419006a03e:core.Destroy.Core"(ptr %self) #0 !dbg !114 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !118 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.119330419006a03e:core.Destroy.Core"(ptr %self) #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !120 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.119330419006a03e:core.Destroy.Core"(ptr %self), !dbg !120 // CHECK:STDOUT: ret void, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.119330419006a03e:core.Destroy.Core"(ptr %self) #0 !dbg !122 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !124 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.119330419006a03e:core.Destroy.Core"(ptr %self) #0 !dbg !126 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.119330419006a03e:core.Destroy.Core"(ptr %self), !dbg !128 -// CHECK:STDOUT: ret void, !dbg !128 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %t) #0 !dbg !130 { -// CHECK:STDOUT: %1 = alloca { ptr }, align 8, !dbg !133 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !133 -// CHECK:STDOUT: %vptr = getelementptr inbounds nuw { ptr }, ptr %1, i32 0, i32 0, !dbg !134 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 8 @C.val.9ff.anon, i64 8, i1 false), !dbg !133 -// CHECK:STDOUT: %vtable = load ptr, ptr %1, align 8, !dbg !136 -// CHECK:STDOUT: %2 = call ptr @llvm.load.relative.i32(ptr %vtable, i32 0), !dbg !136 -// CHECK:STDOUT: %3 = call i11 %2(ptr %1), !dbg !136 -// CHECK:STDOUT: %vtable1 = load ptr, ptr %1, align 8, !dbg !139 -// CHECK:STDOUT: %4 = call ptr @llvm.load.relative.i32(ptr %vtable1, i32 4), !dbg !139 -// CHECK:STDOUT: %5 = call i12 %4(ptr %1, ptr %t), !dbg !139 -// CHECK:STDOUT: call void @"_CSelfDestruct.119330419006a03e:core.Destroy.Core"(ptr %1), !dbg !133 -// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %t) #0 !dbg !122 { +// CHECK:STDOUT: %1 = alloca { ptr }, align 8, !dbg !125 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !125 +// CHECK:STDOUT: %vptr = getelementptr inbounds nuw { ptr }, ptr %1, i32 0, i32 0, !dbg !126 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 8 @C.val.9ff.anon, i64 8, i1 false), !dbg !125 +// CHECK:STDOUT: %vtable = load ptr, ptr %1, align 8, !dbg !128 +// CHECK:STDOUT: %2 = call ptr @llvm.load.relative.i32(ptr %vtable, i32 0), !dbg !128 +// CHECK:STDOUT: %3 = call i11 %2(ptr %1), !dbg !128 +// CHECK:STDOUT: %vtable1 = load ptr, ptr %1, align 8, !dbg !131 +// CHECK:STDOUT: %4 = call ptr @llvm.load.relative.i32(ptr %vtable1, i32 4), !dbg !131 +// CHECK:STDOUT: %5 = call i12 %4(ptr %1, ptr %t), !dbg !131 +// CHECK:STDOUT: call void @"_CSelfDestruct.119330419006a03e:core.Destroy.Core"(ptr %1), !dbg !125 +// CHECK:STDOUT: ret void, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i11 @_CF.C.Main.9522ff908e97e267(ptr %self) #0 !dbg !145 { -// CHECK:STDOUT: ret i11 11, !dbg !150 +// CHECK:STDOUT: define linkonce_odr i11 @_CF.C.Main.9522ff908e97e267(ptr %self) #0 !dbg !137 { +// CHECK:STDOUT: ret i11 11, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) // CHECK:STDOUT: declare ptr @llvm.load.relative.i32(ptr, i32) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i12 @_CG.C.Main.9522ff908e97e267(ptr %self, ptr %t) #0 !dbg !152 { -// CHECK:STDOUT: ret i12 12, !dbg !159 +// CHECK:STDOUT: define linkonce_odr i12 @_CG.C.Main.9522ff908e97e267(ptr %self, ptr %t) #0 !dbg !144 { +// CHECK:STDOUT: ret i12 12, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -435,7 +417,7 @@ 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.dbg.cu = !{!93} +// CHECK:STDOUT: !llvm.dbg.cu = !{!89} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -445,67 +427,63 @@ fn CallF() { // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) // CHECK:STDOUT: !31 = !{null} // CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// CHECK:STDOUT: !69 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") -// CHECK:STDOUT: !71 = !DIBasicType(name: "int", size: 11, encoding: DW_ATE_signed) -// CHECK:STDOUT: !72 = !DIBasicType(name: "int", size: 12, encoding: DW_ATE_signed) -// CHECK:STDOUT: !78 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") -// CHECK:STDOUT: !92 = !DIFile(filename: "use_without_completion_in_virtual_call.carbon", directory: "") -// CHECK:STDOUT: !93 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !92, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !92, line: 8, type: !32, spFlags: DISPFlagDefinition, unit: !93) -// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 8, scope: !94) -// CHECK:STDOUT: !96 = !DILocation(line: 9, column: 3, scope: !94) -// CHECK:STDOUT: !97 = !DILocation(line: 8, column: 1, scope: !94) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !92, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !101) +// CHECK:STDOUT: !65 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !67 = !DIBasicType(name: "int", size: 11, encoding: DW_ATE_signed) +// CHECK:STDOUT: !68 = !DIBasicType(name: "int", size: 12, encoding: DW_ATE_signed) +// CHECK:STDOUT: !74 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !88 = !DIFile(filename: "use_without_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !89 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !88, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !88, line: 8, type: !32, spFlags: DISPFlagDefinition, unit: !89) +// CHECK:STDOUT: !91 = !DILocation(line: 9, column: 8, scope: !90) +// CHECK:STDOUT: !92 = !DILocation(line: 9, column: 3, scope: !90) +// CHECK:STDOUT: !93 = !DILocation(line: 8, column: 1, scope: !90) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !88, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !97) +// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !22) +// CHECK:STDOUT: !96 = !DILocation(line: 9, column: 8, scope: !94) +// CHECK:STDOUT: !97 = !{!95} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !88, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !101) // CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !22) // CHECK:STDOUT: !100 = !DILocation(line: 9, column: 8, scope: !98) // CHECK:STDOUT: !101 = !{!99} -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !92, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !105) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !105) // CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !22) -// CHECK:STDOUT: !104 = !DILocation(line: 9, column: 8, scope: !102) +// CHECK:STDOUT: !104 = !DILocation(line: 7, column: 3, scope: !102) // CHECK:STDOUT: !105 = !{!103} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !92, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !109) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !109) // CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !22) -// CHECK:STDOUT: !108 = !DILocation(line: 9, column: 8, scope: !106) +// CHECK:STDOUT: !108 = !DILocation(line: 7, column: 3, scope: !106) // CHECK:STDOUT: !109 = !{!107} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !113) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !113) // CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !22) // CHECK:STDOUT: !112 = !DILocation(line: 7, column: 3, scope: !110) // CHECK:STDOUT: !113 = !{!111} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !117) +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.119330419006a03e:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !117) // CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !22) // CHECK:STDOUT: !116 = !DILocation(line: 7, column: 3, scope: !114) // CHECK:STDOUT: !117 = !{!115} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !121) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.119330419006a03e:core.Destroy.Core", scope: null, file: !74, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !121) // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !22) // CHECK:STDOUT: !120 = !DILocation(line: 7, column: 3, scope: !118) // CHECK:STDOUT: !121 = !{!119} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.119330419006a03e:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !125) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !74, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !136) // CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !22) -// CHECK:STDOUT: !124 = !DILocation(line: 7, column: 3, scope: !122) -// CHECK:STDOUT: !125 = !{!123} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.119330419006a03e:core.Destroy.Core", scope: null, file: !78, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !129) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !22) -// CHECK:STDOUT: !128 = !DILocation(line: 7, column: 3, scope: !126) -// CHECK:STDOUT: !129 = !{!127} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !78, line: 6, type: !24, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !144) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !22) -// CHECK:STDOUT: !133 = !DILocation(line: 7, column: 3, scope: !130) -// CHECK:STDOUT: !134 = !DILocation(line: 7, column: 17, scope: !130) -// CHECK:STDOUT: !136 = !DILocation(line: 8, column: 3, scope: !130) -// CHECK:STDOUT: !137 = !{!71, !22} -// CHECK:STDOUT: !138 = !DISubroutineType(types: !137) -// CHECK:STDOUT: !139 = !DILocation(line: 9, column: 3, scope: !130) -// CHECK:STDOUT: !141 = !{!72, !22, !22} -// CHECK:STDOUT: !142 = !DISubroutineType(types: !141) -// CHECK:STDOUT: !143 = !DILocation(line: 6, column: 1, scope: !130) -// CHECK:STDOUT: !144 = !{!131} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.9522ff908e97e267", scope: null, file: !69, line: 6, type: !138, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !151) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !22) -// CHECK:STDOUT: !150 = !DILocation(line: 6, column: 47, scope: !145) -// CHECK:STDOUT: !151 = !{!146} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.9522ff908e97e267", scope: null, file: !69, line: 7, type: !142, spFlags: DISPFlagDefinition, unit: !93, retainedNodes: !160) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !22) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 2, scope: !152, type: !22) -// CHECK:STDOUT: !159 = !DILocation(line: 7, column: 60, scope: !152) -// CHECK:STDOUT: !160 = !{!153, !154} +// CHECK:STDOUT: !125 = !DILocation(line: 7, column: 3, scope: !122) +// CHECK:STDOUT: !126 = !DILocation(line: 7, column: 17, scope: !122) +// CHECK:STDOUT: !128 = !DILocation(line: 8, column: 3, scope: !122) +// CHECK:STDOUT: !129 = !{!67, !22} +// CHECK:STDOUT: !130 = !DISubroutineType(types: !129) +// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 3, scope: !122) +// CHECK:STDOUT: !133 = !{!68, !22, !22} +// CHECK:STDOUT: !134 = !DISubroutineType(types: !133) +// CHECK:STDOUT: !135 = !DILocation(line: 6, column: 1, scope: !122) +// CHECK:STDOUT: !136 = !{!123} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.9522ff908e97e267", scope: null, file: !65, line: 6, type: !130, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !143) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !22) +// CHECK:STDOUT: !142 = !DILocation(line: 6, column: 47, scope: !137) +// CHECK:STDOUT: !143 = !{!138} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.9522ff908e97e267", scope: null, file: !65, line: 7, type: !134, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !152) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !22) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !144, type: !22) +// CHECK:STDOUT: !151 = !DILocation(line: 7, column: 60, scope: !144) +// CHECK:STDOUT: !152 = !{!145, !146} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon index 74b65259356c..82c4d39b13ee 100644 --- a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon +++ b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon @@ -198,44 +198,37 @@ fn CallGeneric() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !63 // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !71 // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !75 // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !79 -// CHECK:STDOUT: ret void, !dbg !79 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -268,44 +261,40 @@ fn CallGeneric() { // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !6) // CHECK:STDOUT: !55 = !DILocation(line: 5, column: 15, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !6) // CHECK:STDOUT: !59 = !DILocation(line: 5, column: 15, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !6) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !64) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !7) // CHECK:STDOUT: !63 = !DILocation(line: 5, column: 15, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !7) // CHECK:STDOUT: !67 = !DILocation(line: 5, column: 15, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !72) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !7) // CHECK:STDOUT: !71 = !DILocation(line: 5, column: 15, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !76) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !76) // CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !7) // CHECK:STDOUT: !75 = !DILocation(line: 5, column: 15, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) -// CHECK:STDOUT: !79 = !DILocation(line: 5, column: 15, scope: !77) -// CHECK:STDOUT: !80 = !{!78} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'direct_same_package.carbon' // CHECK:STDOUT: source_filename = "direct_same_package.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDirect.OwningPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !83 { +// CHECK:STDOUT: define void @_CDirect.OwningPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !91 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !91 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !91 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !90 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !91 -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !87 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !87 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !86 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !87 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr sret({ i32 }), ptr, i32) @@ -313,57 +302,50 @@ fn CallGeneric() { // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr sret({ i32 }), ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !94 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !94 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !98 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !98 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !102 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !104 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !104 // CHECK:STDOUT: ret void, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !106 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !110 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !112 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !112 // CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !114 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !116 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !118 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !120 -// CHECK:STDOUT: ret void, !dbg !120 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!82} +// CHECK:STDOUT: !llvm.dbg.cu = !{!78} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -376,43 +358,39 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !81 = !DIFile(filename: "direct_same_package.carbon", directory: "") -// CHECK:STDOUT: !82 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !81, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !81, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !93) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !7) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !83, type: !7) -// CHECK:STDOUT: !90 = !DILocation(line: 7, column: 10, scope: !83) -// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 15, scope: !83) -// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 3, scope: !83) -// CHECK:STDOUT: !93 = !{!84, !85} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !81, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !97) +// CHECK:STDOUT: !77 = !DIFile(filename: "direct_same_package.carbon", directory: "") +// CHECK:STDOUT: !78 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !77, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !77, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !89) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !7) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 2, scope: !79, type: !7) +// CHECK:STDOUT: !86 = !DILocation(line: 7, column: 10, scope: !79) +// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 15, scope: !79) +// CHECK:STDOUT: !88 = !DILocation(line: 7, column: 3, scope: !79) +// CHECK:STDOUT: !89 = !{!80, !81} +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !77, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !93) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !6) +// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 15, scope: !90) +// CHECK:STDOUT: !93 = !{!91} +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !77, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !97) // CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !6) // CHECK:STDOUT: !96 = !DILocation(line: 7, column: 15, scope: !94) // CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !81, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !101) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !6) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !77, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !101) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !7) // CHECK:STDOUT: !100 = !DILocation(line: 7, column: 15, scope: !98) // CHECK:STDOUT: !101 = !{!99} -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !81, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !105) -// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !6) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !77, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !105) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !7) // CHECK:STDOUT: !104 = !DILocation(line: 7, column: 15, scope: !102) // CHECK:STDOUT: !105 = !{!103} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !81, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !109) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !77, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !109) // CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !7) // CHECK:STDOUT: !108 = !DILocation(line: 7, column: 15, scope: !106) // CHECK:STDOUT: !109 = !{!107} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !81, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !113) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !77, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !113) // CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !7) // CHECK:STDOUT: !112 = !DILocation(line: 7, column: 15, scope: !110) // CHECK:STDOUT: !113 = !{!111} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !81, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !117) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !7) -// CHECK:STDOUT: !116 = !DILocation(line: 7, column: 15, scope: !114) -// CHECK:STDOUT: !117 = !{!115} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !81, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !121) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !7) -// CHECK:STDOUT: !120 = !DILocation(line: 7, column: 15, scope: !118) -// CHECK:STDOUT: !121 = !{!119} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_same_package.carbon' @@ -423,55 +401,48 @@ fn CallGeneric() { // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr sret({ i32 }), ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !126 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !118 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !120 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !122 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !124 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !126 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !130 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !130 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !132 // CHECK:STDOUT: ret void, !dbg !132 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !134 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !134 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !136 // CHECK:STDOUT: ret void, !dbg !136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !138 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !138 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !140 // CHECK:STDOUT: ret void, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !142 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !144 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !146 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !148 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !150 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !152 -// CHECK:STDOUT: ret void, !dbg !152 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OwningPackage(ptr sret({ i32 })) // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!123} +// CHECK:STDOUT: !llvm.dbg.cu = !{!115} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -482,117 +453,106 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !122 = !DIFile(filename: "generic_same_package.carbon", directory: "") -// CHECK:STDOUT: !123 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !122, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !122, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !129) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !6) +// CHECK:STDOUT: !114 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !115 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !114, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !114, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !121) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !6) +// CHECK:STDOUT: !120 = !DILocation(line: 6, column: 15, scope: !118) +// CHECK:STDOUT: !121 = !{!119} +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !114, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !125) +// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !6) +// CHECK:STDOUT: !124 = !DILocation(line: 6, column: 15, scope: !122) +// CHECK:STDOUT: !125 = !{!123} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !114, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !129) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !7) // CHECK:STDOUT: !128 = !DILocation(line: 6, column: 15, scope: !126) // CHECK:STDOUT: !129 = !{!127} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !122, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !6) +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !114, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !133) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !7) // CHECK:STDOUT: !132 = !DILocation(line: 6, column: 15, scope: !130) // CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !122, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !137) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !6) +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !114, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !137) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !7) // CHECK:STDOUT: !136 = !DILocation(line: 6, column: 15, scope: !134) // CHECK:STDOUT: !137 = !{!135} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !122, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !141) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !114, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !141) // CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !7) // CHECK:STDOUT: !140 = !DILocation(line: 6, column: 15, scope: !138) // CHECK:STDOUT: !141 = !{!139} -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !122, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !145) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !7) -// CHECK:STDOUT: !144 = !DILocation(line: 6, column: 15, scope: !142) -// CHECK:STDOUT: !145 = !{!143} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !122, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !149) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !7) -// CHECK:STDOUT: !148 = !DILocation(line: 6, column: 15, scope: !146) -// CHECK:STDOUT: !149 = !{!147} -// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !122, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !123, retainedNodes: !153) -// CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !7) -// CHECK:STDOUT: !152 = !DILocation(line: 6, column: 15, scope: !150) -// CHECK:STDOUT: !153 = !{!151} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_same_package.carbon' // CHECK:STDOUT: source_filename = "indirect_same_package.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallGeneric.OwningPackage() #0 !dbg !158 { +// CHECK:STDOUT: define void @_CCallGeneric.OwningPackage() #0 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !159 -// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !160 -// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !161 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !159 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_20.1.temp), !dbg !159 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !160 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_28.1.temp), !dbg !160 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !161 -// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !160 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !159 -// CHECK:STDOUT: ret void, !dbg !162 +// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !147 +// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !148 +// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !149 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !147 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_20.1.temp), !dbg !147 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !148 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_28.1.temp), !dbg !148 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !149 +// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !149 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !149 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !148 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !147 +// CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OwningPackage(ptr sret({ i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !151 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !155 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !157 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !165 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !167 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !167 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !171 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !173 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !173 // CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !175 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !177 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !181 -// CHECK:STDOUT: ret void, !dbg !181 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !183 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !185 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !187 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !189 -// CHECK:STDOUT: ret void, !dbg !189 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !191 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !199 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !199 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !199 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !198 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !199 -// CHECK:STDOUT: ret void, !dbg !200 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !175 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !183 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !183 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !183 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !182 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !183 +// CHECK:STDOUT: ret void, !dbg !184 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr sret({ i32 }), ptr, i32) @@ -607,7 +567,7 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!155} +// CHECK:STDOUT: !llvm.dbg.cu = !{!143} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -620,65 +580,61 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !122 = !DIFile(filename: "generic_same_package.carbon", directory: "") -// CHECK:STDOUT: !154 = !DIFile(filename: "indirect_same_package.carbon", directory: "") -// CHECK:STDOUT: !155 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !154, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !156 = !{null} -// CHECK:STDOUT: !157 = !DISubroutineType(types: !156) -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OwningPackage", scope: null, file: !154, line: 5, type: !157, spFlags: DISPFlagDefinition, unit: !155) -// CHECK:STDOUT: !159 = !DILocation(line: 7, column: 15, scope: !158) -// CHECK:STDOUT: !160 = !DILocation(line: 7, column: 23, scope: !158) -// CHECK:STDOUT: !161 = !DILocation(line: 7, column: 3, scope: !158) -// CHECK:STDOUT: !162 = !DILocation(line: 5, column: 1, scope: !158) -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !154, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !166) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !6) +// CHECK:STDOUT: !114 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !142 = !DIFile(filename: "indirect_same_package.carbon", directory: "") +// CHECK:STDOUT: !143 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !142, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !144 = !{null} +// CHECK:STDOUT: !145 = !DISubroutineType(types: !144) +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OwningPackage", scope: null, file: !142, line: 5, type: !145, spFlags: DISPFlagDefinition, unit: !143) +// CHECK:STDOUT: !147 = !DILocation(line: 7, column: 15, scope: !146) +// CHECK:STDOUT: !148 = !DILocation(line: 7, column: 23, scope: !146) +// CHECK:STDOUT: !149 = !DILocation(line: 7, column: 3, scope: !146) +// CHECK:STDOUT: !150 = !DILocation(line: 5, column: 1, scope: !146) +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !142, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !154) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !6) +// CHECK:STDOUT: !153 = !DILocation(line: 7, column: 3, scope: !151) +// CHECK:STDOUT: !154 = !{!152} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !142, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !158) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !6) +// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !155) +// CHECK:STDOUT: !158 = !{!156} +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !142, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !162) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !7) +// CHECK:STDOUT: !161 = !DILocation(line: 7, column: 3, scope: !159) +// CHECK:STDOUT: !162 = !{!160} +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !142, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !166) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !7) // CHECK:STDOUT: !165 = !DILocation(line: 7, column: 3, scope: !163) // CHECK:STDOUT: !166 = !{!164} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !154, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !170) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !6) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !142, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !170) +// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !7) // CHECK:STDOUT: !169 = !DILocation(line: 7, column: 3, scope: !167) // CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !154, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !174) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !6) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !142, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !174) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !7) // CHECK:STDOUT: !173 = !DILocation(line: 7, column: 3, scope: !171) // CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !154, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !178) +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !114, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !143, retainedNodes: !185) // CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !7) -// CHECK:STDOUT: !177 = !DILocation(line: 7, column: 3, scope: !175) -// CHECK:STDOUT: !178 = !{!176} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !154, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !7) -// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 3, scope: !179) -// CHECK:STDOUT: !182 = !{!180} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !154, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !7) -// CHECK:STDOUT: !185 = !DILocation(line: 7, column: 3, scope: !183) -// CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !154, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !7) -// CHECK:STDOUT: !189 = !DILocation(line: 7, column: 3, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !122, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !201) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !7) -// CHECK:STDOUT: !193 = !DILocalVariable(arg: 2, scope: !191, type: !7) -// CHECK:STDOUT: !198 = !DILocation(line: 6, column: 10, scope: !191) -// CHECK:STDOUT: !199 = !DILocation(line: 6, column: 15, scope: !191) -// CHECK:STDOUT: !200 = !DILocation(line: 6, column: 3, scope: !191) -// CHECK:STDOUT: !201 = !{!192, !193} +// CHECK:STDOUT: !177 = !DILocalVariable(arg: 2, scope: !175, type: !7) +// CHECK:STDOUT: !182 = !DILocation(line: 6, column: 10, scope: !175) +// CHECK:STDOUT: !183 = !DILocation(line: 6, column: 15, scope: !175) +// CHECK:STDOUT: !184 = !DILocation(line: 6, column: 3, scope: !175) +// CHECK:STDOUT: !185 = !{!176, !177} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'direct_different_package.carbon' // CHECK:STDOUT: source_filename = "direct_different_package.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDirect.OtherPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !204 { +// CHECK:STDOUT: define void @_CDirect.OtherPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !188 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !212 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !212 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !212 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !211 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !212 -// CHECK:STDOUT: ret void, !dbg !213 +// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !196 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !196 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !196 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !195 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !196 +// CHECK:STDOUT: ret void, !dbg !197 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr sret({ i32 }), ptr, i32) @@ -686,57 +642,50 @@ fn CallGeneric() { // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr sret({ i32 }), ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !199 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !203 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !209 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !213 +// CHECK:STDOUT: ret void, !dbg !213 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !221 // CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !223 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !225 -// CHECK:STDOUT: ret void, !dbg !225 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !227 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !229 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !231 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !233 -// CHECK:STDOUT: ret void, !dbg !233 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !235 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !237 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !239 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !241 -// CHECK:STDOUT: ret void, !dbg !241 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!203} +// CHECK:STDOUT: !llvm.dbg.cu = !{!187} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -749,124 +698,113 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !202 = !DIFile(filename: "direct_different_package.carbon", directory: "") -// CHECK:STDOUT: !203 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !202, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !202, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !214) -// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !7) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 2, scope: !204, type: !7) -// CHECK:STDOUT: !211 = !DILocation(line: 7, column: 10, scope: !204) -// CHECK:STDOUT: !212 = !DILocation(line: 7, column: 15, scope: !204) -// CHECK:STDOUT: !213 = !DILocation(line: 7, column: 3, scope: !204) -// CHECK:STDOUT: !214 = !{!205, !206} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !202, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !6) +// CHECK:STDOUT: !186 = !DIFile(filename: "direct_different_package.carbon", directory: "") +// CHECK:STDOUT: !187 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !186, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !186, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !198) +// CHECK:STDOUT: !189 = !DILocalVariable(arg: 1, scope: !188, type: !7) +// CHECK:STDOUT: !190 = !DILocalVariable(arg: 2, scope: !188, type: !7) +// CHECK:STDOUT: !195 = !DILocation(line: 7, column: 10, scope: !188) +// CHECK:STDOUT: !196 = !DILocation(line: 7, column: 15, scope: !188) +// CHECK:STDOUT: !197 = !DILocation(line: 7, column: 3, scope: !188) +// CHECK:STDOUT: !198 = !{!189, !190} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !186, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !6) +// CHECK:STDOUT: !201 = !DILocation(line: 7, column: 15, scope: !199) +// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !186, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !206) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !6) +// CHECK:STDOUT: !205 = !DILocation(line: 7, column: 15, scope: !203) +// CHECK:STDOUT: !206 = !{!204} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !186, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !210) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !7) +// CHECK:STDOUT: !209 = !DILocation(line: 7, column: 15, scope: !207) +// CHECK:STDOUT: !210 = !{!208} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !186, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !214) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !7) +// CHECK:STDOUT: !213 = !DILocation(line: 7, column: 15, scope: !211) +// CHECK:STDOUT: !214 = !{!212} +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !186, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !218) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !7) // CHECK:STDOUT: !217 = !DILocation(line: 7, column: 15, scope: !215) // CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !202, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !6) +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !186, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !187, retainedNodes: !222) +// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !7) // CHECK:STDOUT: !221 = !DILocation(line: 7, column: 15, scope: !219) // CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !202, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !226) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !6) -// CHECK:STDOUT: !225 = !DILocation(line: 7, column: 15, scope: !223) -// CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !202, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !230) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !7) -// CHECK:STDOUT: !229 = !DILocation(line: 7, column: 15, scope: !227) -// CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !202, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !234) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !7) -// CHECK:STDOUT: !233 = !DILocation(line: 7, column: 15, scope: !231) -// CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !202, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !238) -// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !7) -// CHECK:STDOUT: !237 = !DILocation(line: 7, column: 15, scope: !235) -// CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !202, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !203, retainedNodes: !242) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !7) -// CHECK:STDOUT: !241 = !DILocation(line: 7, column: 15, scope: !239) -// CHECK:STDOUT: !242 = !{!240} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_different_package_via_generic_in_same_package.carbon' // CHECK:STDOUT: source_filename = "indirect_different_package_via_generic_in_same_package.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallGenericInOwningPackage.OtherPackage() #0 !dbg !245 { +// CHECK:STDOUT: define void @_CCallGenericInOwningPackage.OtherPackage() #0 !dbg !225 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_48.1.temp = alloca { i32 }, align 4, !dbg !246 -// CHECK:STDOUT: %.loc7_70.1.temp = alloca { i32 }, align 4, !dbg !247 -// CHECK:STDOUT: %.loc7_71.2.temp = alloca { i32 }, align 4, !dbg !248 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_48.1.temp), !dbg !246 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_48.1.temp), !dbg !246 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_70.1.temp), !dbg !247 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_70.1.temp), !dbg !247 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_71.2.temp), !dbg !248 -// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_71.2.temp, ptr %.loc7_48.1.temp, ptr %.loc7_70.1.temp), !dbg !248 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_71.2.temp), !dbg !248 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_70.1.temp), !dbg !247 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_48.1.temp), !dbg !246 -// CHECK:STDOUT: ret void, !dbg !249 +// CHECK:STDOUT: %.loc7_48.1.temp = alloca { i32 }, align 4, !dbg !226 +// CHECK:STDOUT: %.loc7_70.1.temp = alloca { i32 }, align 4, !dbg !227 +// CHECK:STDOUT: %.loc7_71.2.temp = alloca { i32 }, align 4, !dbg !228 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_48.1.temp), !dbg !226 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_48.1.temp), !dbg !226 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_70.1.temp), !dbg !227 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_70.1.temp), !dbg !227 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_71.2.temp), !dbg !228 +// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_71.2.temp, ptr %.loc7_48.1.temp, ptr %.loc7_70.1.temp), !dbg !228 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_71.2.temp), !dbg !228 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_70.1.temp), !dbg !227 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_48.1.temp), !dbg !226 +// CHECK:STDOUT: ret void, !dbg !229 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OwningPackage(ptr sret({ i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !250 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !230 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !232 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !234 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !236 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !238 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !240 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !242 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !244 +// CHECK:STDOUT: ret void, !dbg !244 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !246 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !248 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !250 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !252 // CHECK:STDOUT: ret void, !dbg !252 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !254 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !256 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !258 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !260 -// CHECK:STDOUT: ret void, !dbg !260 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !262 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !264 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !266 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !268 -// CHECK:STDOUT: ret void, !dbg !268 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !270 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !272 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !274 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !276 -// CHECK:STDOUT: ret void, !dbg !276 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !278 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !286 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !286 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !286 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !285 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !286 -// CHECK:STDOUT: ret void, !dbg !287 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !254 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !262 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !262 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !262 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !261 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !262 +// CHECK:STDOUT: ret void, !dbg !263 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr sret({ i32 }), ptr, i32) @@ -881,7 +819,7 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!244} +// CHECK:STDOUT: !llvm.dbg.cu = !{!224} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -894,51 +832,47 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !122 = !DIFile(filename: "generic_same_package.carbon", directory: "") -// CHECK:STDOUT: !156 = !{null} -// CHECK:STDOUT: !157 = !DISubroutineType(types: !156) -// CHECK:STDOUT: !243 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") -// CHECK:STDOUT: !244 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !243, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !243, line: 5, type: !157, spFlags: DISPFlagDefinition, unit: !244) -// CHECK:STDOUT: !246 = !DILocation(line: 7, column: 29, scope: !245) -// CHECK:STDOUT: !247 = !DILocation(line: 7, column: 51, scope: !245) -// CHECK:STDOUT: !248 = !DILocation(line: 7, column: 3, scope: !245) -// CHECK:STDOUT: !249 = !DILocation(line: 5, column: 1, scope: !245) -// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !243, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !253) -// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !6) +// CHECK:STDOUT: !114 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !144 = !{null} +// CHECK:STDOUT: !145 = !DISubroutineType(types: !144) +// CHECK:STDOUT: !223 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") +// CHECK:STDOUT: !224 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !223, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !223, line: 5, type: !145, spFlags: DISPFlagDefinition, unit: !224) +// CHECK:STDOUT: !226 = !DILocation(line: 7, column: 29, scope: !225) +// CHECK:STDOUT: !227 = !DILocation(line: 7, column: 51, scope: !225) +// CHECK:STDOUT: !228 = !DILocation(line: 7, column: 3, scope: !225) +// CHECK:STDOUT: !229 = !DILocation(line: 5, column: 1, scope: !225) +// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !223, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !233) +// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !6) +// CHECK:STDOUT: !232 = !DILocation(line: 7, column: 3, scope: !230) +// CHECK:STDOUT: !233 = !{!231} +// CHECK:STDOUT: !234 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !223, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !237) +// CHECK:STDOUT: !235 = !DILocalVariable(arg: 1, scope: !234, type: !6) +// CHECK:STDOUT: !236 = !DILocation(line: 7, column: 3, scope: !234) +// CHECK:STDOUT: !237 = !{!235} +// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !223, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !241) +// CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !7) +// CHECK:STDOUT: !240 = !DILocation(line: 7, column: 3, scope: !238) +// CHECK:STDOUT: !241 = !{!239} +// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !223, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !245) +// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !7) +// CHECK:STDOUT: !244 = !DILocation(line: 7, column: 3, scope: !242) +// CHECK:STDOUT: !245 = !{!243} +// CHECK:STDOUT: !246 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !223, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !249) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 1, scope: !246, type: !7) +// CHECK:STDOUT: !248 = !DILocation(line: 7, column: 3, scope: !246) +// CHECK:STDOUT: !249 = !{!247} +// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !223, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !253) +// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !7) // CHECK:STDOUT: !252 = !DILocation(line: 7, column: 3, scope: !250) // CHECK:STDOUT: !253 = !{!251} -// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !243, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !257) -// CHECK:STDOUT: !255 = !DILocalVariable(arg: 1, scope: !254, type: !6) -// CHECK:STDOUT: !256 = !DILocation(line: 7, column: 3, scope: !254) -// CHECK:STDOUT: !257 = !{!255} -// CHECK:STDOUT: !258 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !243, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !261) -// CHECK:STDOUT: !259 = !DILocalVariable(arg: 1, scope: !258, type: !6) -// CHECK:STDOUT: !260 = !DILocation(line: 7, column: 3, scope: !258) -// CHECK:STDOUT: !261 = !{!259} -// CHECK:STDOUT: !262 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !243, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !265) -// CHECK:STDOUT: !263 = !DILocalVariable(arg: 1, scope: !262, type: !7) -// CHECK:STDOUT: !264 = !DILocation(line: 7, column: 3, scope: !262) -// CHECK:STDOUT: !265 = !{!263} -// CHECK:STDOUT: !266 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !243, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !269) -// CHECK:STDOUT: !267 = !DILocalVariable(arg: 1, scope: !266, type: !7) -// CHECK:STDOUT: !268 = !DILocation(line: 7, column: 3, scope: !266) -// CHECK:STDOUT: !269 = !{!267} -// CHECK:STDOUT: !270 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !243, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !273) -// CHECK:STDOUT: !271 = !DILocalVariable(arg: 1, scope: !270, type: !7) -// CHECK:STDOUT: !272 = !DILocation(line: 7, column: 3, scope: !270) -// CHECK:STDOUT: !273 = !{!271} -// CHECK:STDOUT: !274 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !243, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !277) -// CHECK:STDOUT: !275 = !DILocalVariable(arg: 1, scope: !274, type: !7) -// CHECK:STDOUT: !276 = !DILocation(line: 7, column: 3, scope: !274) -// CHECK:STDOUT: !277 = !{!275} -// CHECK:STDOUT: !278 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !122, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !244, retainedNodes: !288) -// CHECK:STDOUT: !279 = !DILocalVariable(arg: 1, scope: !278, type: !7) -// CHECK:STDOUT: !280 = !DILocalVariable(arg: 2, scope: !278, type: !7) -// CHECK:STDOUT: !285 = !DILocation(line: 6, column: 10, scope: !278) -// CHECK:STDOUT: !286 = !DILocation(line: 6, column: 15, scope: !278) -// CHECK:STDOUT: !287 = !DILocation(line: 6, column: 3, scope: !278) -// CHECK:STDOUT: !288 = !{!279, !280} +// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !114, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !224, retainedNodes: !264) +// CHECK:STDOUT: !255 = !DILocalVariable(arg: 1, scope: !254, type: !7) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 2, scope: !254, type: !7) +// CHECK:STDOUT: !261 = !DILocation(line: 6, column: 10, scope: !254) +// CHECK:STDOUT: !262 = !DILocation(line: 6, column: 15, scope: !254) +// CHECK:STDOUT: !263 = !DILocation(line: 6, column: 3, scope: !254) +// CHECK:STDOUT: !264 = !{!255, !256} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_different_package.carbon' @@ -949,55 +883,48 @@ fn CallGeneric() { // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr sret({ i32 }), ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !291 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !267 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !293 +// CHECK:STDOUT: ret void, !dbg !269 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !295 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !297 +// CHECK:STDOUT: ret void, !dbg !273 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !299 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !275 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !301 -// CHECK:STDOUT: ret void, !dbg !301 +// CHECK:STDOUT: ret void, !dbg !277 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !303 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !279 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !305 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !281 +// CHECK:STDOUT: ret void, !dbg !281 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !307 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !283 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !309 -// CHECK:STDOUT: ret void, !dbg !309 +// CHECK:STDOUT: ret void, !dbg !285 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !311 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !287 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !313 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !315 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !317 -// CHECK:STDOUT: ret void, !dbg !317 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !289 +// CHECK:STDOUT: ret void, !dbg !289 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OtherPackage(ptr sret({ i32 })) // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!290} +// CHECK:STDOUT: !llvm.dbg.cu = !{!266} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1008,117 +935,106 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !289 = !DIFile(filename: "generic_different_package.carbon", directory: "") -// CHECK:STDOUT: !290 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !289, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !291 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !289, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !294) -// CHECK:STDOUT: !292 = !DILocalVariable(arg: 1, scope: !291, type: !6) -// CHECK:STDOUT: !293 = !DILocation(line: 6, column: 15, scope: !291) -// CHECK:STDOUT: !294 = !{!292} -// CHECK:STDOUT: !295 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !289, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !298) -// CHECK:STDOUT: !296 = !DILocalVariable(arg: 1, scope: !295, type: !6) -// CHECK:STDOUT: !297 = !DILocation(line: 6, column: 15, scope: !295) -// CHECK:STDOUT: !298 = !{!296} -// CHECK:STDOUT: !299 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !289, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !302) -// CHECK:STDOUT: !300 = !DILocalVariable(arg: 1, scope: !299, type: !6) -// CHECK:STDOUT: !301 = !DILocation(line: 6, column: 15, scope: !299) -// CHECK:STDOUT: !302 = !{!300} -// CHECK:STDOUT: !303 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !289, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !306) -// CHECK:STDOUT: !304 = !DILocalVariable(arg: 1, scope: !303, type: !7) -// CHECK:STDOUT: !305 = !DILocation(line: 6, column: 15, scope: !303) -// CHECK:STDOUT: !306 = !{!304} -// CHECK:STDOUT: !307 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !289, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !310) -// CHECK:STDOUT: !308 = !DILocalVariable(arg: 1, scope: !307, type: !7) -// CHECK:STDOUT: !309 = !DILocation(line: 6, column: 15, scope: !307) -// CHECK:STDOUT: !310 = !{!308} -// CHECK:STDOUT: !311 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !289, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !314) -// CHECK:STDOUT: !312 = !DILocalVariable(arg: 1, scope: !311, type: !7) -// CHECK:STDOUT: !313 = !DILocation(line: 6, column: 15, scope: !311) -// CHECK:STDOUT: !314 = !{!312} -// CHECK:STDOUT: !315 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !289, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !290, retainedNodes: !318) -// CHECK:STDOUT: !316 = !DILocalVariable(arg: 1, scope: !315, type: !7) -// CHECK:STDOUT: !317 = !DILocation(line: 6, column: 15, scope: !315) -// CHECK:STDOUT: !318 = !{!316} +// CHECK:STDOUT: !265 = !DIFile(filename: "generic_different_package.carbon", directory: "") +// CHECK:STDOUT: !266 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !265, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !265, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !270) +// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !6) +// CHECK:STDOUT: !269 = !DILocation(line: 6, column: 15, scope: !267) +// CHECK:STDOUT: !270 = !{!268} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !265, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !274) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !6) +// CHECK:STDOUT: !273 = !DILocation(line: 6, column: 15, scope: !271) +// CHECK:STDOUT: !274 = !{!272} +// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !265, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !278) +// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !7) +// CHECK:STDOUT: !277 = !DILocation(line: 6, column: 15, scope: !275) +// CHECK:STDOUT: !278 = !{!276} +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !265, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !282) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !7) +// CHECK:STDOUT: !281 = !DILocation(line: 6, column: 15, scope: !279) +// CHECK:STDOUT: !282 = !{!280} +// CHECK:STDOUT: !283 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !265, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !286) +// CHECK:STDOUT: !284 = !DILocalVariable(arg: 1, scope: !283, type: !7) +// CHECK:STDOUT: !285 = !DILocation(line: 6, column: 15, scope: !283) +// CHECK:STDOUT: !286 = !{!284} +// CHECK:STDOUT: !287 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !265, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !290) +// CHECK:STDOUT: !288 = !DILocalVariable(arg: 1, scope: !287, type: !7) +// CHECK:STDOUT: !289 = !DILocation(line: 6, column: 15, scope: !287) +// CHECK:STDOUT: !290 = !{!288} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_different_package_via_generic_in_different_package.carbon' // CHECK:STDOUT: source_filename = "indirect_different_package_via_generic_in_different_package.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallGeneric.OtherPackage() #0 !dbg !321 { +// CHECK:STDOUT: define void @_CCallGeneric.OtherPackage() #0 !dbg !293 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !322 -// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !323 -// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !324 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !322 -// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_20.1.temp), !dbg !322 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !323 -// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_28.1.temp), !dbg !323 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !324 -// CHECK:STDOUT: call void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !324 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !324 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !323 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !322 -// CHECK:STDOUT: ret void, !dbg !325 +// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !294 +// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !295 +// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !296 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !294 +// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_20.1.temp), !dbg !294 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !295 +// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_28.1.temp), !dbg !295 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !296 +// CHECK:STDOUT: call void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !296 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !296 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !295 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !294 +// CHECK:STDOUT: ret void, !dbg !297 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OtherPackage(ptr sret({ i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !326 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !298 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !328 +// CHECK:STDOUT: ret void, !dbg !300 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !330 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !302 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !332 +// CHECK:STDOUT: ret void, !dbg !304 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !334 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !306 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !336 -// CHECK:STDOUT: ret void, !dbg !336 +// CHECK:STDOUT: ret void, !dbg !308 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !338 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !310 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !340 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !312 +// CHECK:STDOUT: ret void, !dbg !312 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core"(ptr %self) #0 !dbg !342 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !314 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core"(ptr %self), !dbg !344 -// CHECK:STDOUT: ret void, !dbg !344 +// CHECK:STDOUT: ret void, !dbg !316 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !346 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !318 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !348 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !350 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !352 -// CHECK:STDOUT: ret void, !dbg !352 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !320 +// CHECK:STDOUT: ret void, !dbg !320 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !354 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !362 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !362 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !362 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !361 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !362 -// CHECK:STDOUT: ret void, !dbg !363 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !322 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !330 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !330 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr %temp, ptr %v2, i32 2), !dbg !330 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !329 +// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !330 +// CHECK:STDOUT: ret void, !dbg !331 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.84588f41d61dafba.Core"(ptr sret({ i32 }), ptr, i32) @@ -1133,7 +1049,7 @@ fn CallGeneric() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!320} +// CHECK:STDOUT: !llvm.dbg.cu = !{!292} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1146,49 +1062,45 @@ fn CallGeneric() { // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) // CHECK:STDOUT: !40 = !{null, !7} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !156 = !{null} -// CHECK:STDOUT: !157 = !DISubroutineType(types: !156) -// CHECK:STDOUT: !289 = !DIFile(filename: "generic_different_package.carbon", directory: "") -// CHECK:STDOUT: !319 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") -// CHECK:STDOUT: !320 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !319, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !319, line: 5, type: !157, spFlags: DISPFlagDefinition, unit: !320) -// CHECK:STDOUT: !322 = !DILocation(line: 7, column: 15, scope: !321) -// CHECK:STDOUT: !323 = !DILocation(line: 7, column: 23, scope: !321) -// CHECK:STDOUT: !324 = !DILocation(line: 7, column: 3, scope: !321) -// CHECK:STDOUT: !325 = !DILocation(line: 5, column: 1, scope: !321) -// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !319, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !329) -// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !6) -// CHECK:STDOUT: !328 = !DILocation(line: 7, column: 3, scope: !326) -// CHECK:STDOUT: !329 = !{!327} -// CHECK:STDOUT: !330 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !319, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !333) -// CHECK:STDOUT: !331 = !DILocalVariable(arg: 1, scope: !330, type: !6) -// CHECK:STDOUT: !332 = !DILocation(line: 7, column: 3, scope: !330) -// CHECK:STDOUT: !333 = !{!331} -// CHECK:STDOUT: !334 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !319, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !337) -// CHECK:STDOUT: !335 = !DILocalVariable(arg: 1, scope: !334, type: !6) -// CHECK:STDOUT: !336 = !DILocation(line: 7, column: 3, scope: !334) -// CHECK:STDOUT: !337 = !{!335} -// CHECK:STDOUT: !338 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !319, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !341) -// CHECK:STDOUT: !339 = !DILocalVariable(arg: 1, scope: !338, type: !7) -// CHECK:STDOUT: !340 = !DILocation(line: 7, column: 3, scope: !338) -// CHECK:STDOUT: !341 = !{!339} -// CHECK:STDOUT: !342 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !319, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !345) -// CHECK:STDOUT: !343 = !DILocalVariable(arg: 1, scope: !342, type: !7) -// CHECK:STDOUT: !344 = !DILocation(line: 7, column: 3, scope: !342) -// CHECK:STDOUT: !345 = !{!343} -// CHECK:STDOUT: !346 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !319, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !349) -// CHECK:STDOUT: !347 = !DILocalVariable(arg: 1, scope: !346, type: !7) -// CHECK:STDOUT: !348 = !DILocation(line: 7, column: 3, scope: !346) -// CHECK:STDOUT: !349 = !{!347} -// CHECK:STDOUT: !350 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !319, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !353) -// CHECK:STDOUT: !351 = !DILocalVariable(arg: 1, scope: !350, type: !7) -// CHECK:STDOUT: !352 = !DILocation(line: 7, column: 3, scope: !350) -// CHECK:STDOUT: !353 = !{!351} -// CHECK:STDOUT: !354 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !289, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !320, retainedNodes: !364) -// CHECK:STDOUT: !355 = !DILocalVariable(arg: 1, scope: !354, type: !7) -// CHECK:STDOUT: !356 = !DILocalVariable(arg: 2, scope: !354, type: !7) -// CHECK:STDOUT: !361 = !DILocation(line: 6, column: 10, scope: !354) -// CHECK:STDOUT: !362 = !DILocation(line: 6, column: 15, scope: !354) -// CHECK:STDOUT: !363 = !DILocation(line: 6, column: 3, scope: !354) -// CHECK:STDOUT: !364 = !{!355, !356} +// CHECK:STDOUT: !144 = !{null} +// CHECK:STDOUT: !145 = !DISubroutineType(types: !144) +// CHECK:STDOUT: !265 = !DIFile(filename: "generic_different_package.carbon", directory: "") +// CHECK:STDOUT: !291 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") +// CHECK:STDOUT: !292 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !291, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !291, line: 5, type: !145, spFlags: DISPFlagDefinition, unit: !292) +// CHECK:STDOUT: !294 = !DILocation(line: 7, column: 15, scope: !293) +// CHECK:STDOUT: !295 = !DILocation(line: 7, column: 23, scope: !293) +// CHECK:STDOUT: !296 = !DILocation(line: 7, column: 3, scope: !293) +// CHECK:STDOUT: !297 = !DILocation(line: 5, column: 1, scope: !293) +// CHECK:STDOUT: !298 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !291, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !301) +// CHECK:STDOUT: !299 = !DILocalVariable(arg: 1, scope: !298, type: !6) +// CHECK:STDOUT: !300 = !DILocation(line: 7, column: 3, scope: !298) +// CHECK:STDOUT: !301 = !{!299} +// CHECK:STDOUT: !302 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !291, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !305) +// CHECK:STDOUT: !303 = !DILocalVariable(arg: 1, scope: !302, type: !6) +// CHECK:STDOUT: !304 = !DILocation(line: 7, column: 3, scope: !302) +// CHECK:STDOUT: !305 = !{!303} +// CHECK:STDOUT: !306 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !291, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !309) +// CHECK:STDOUT: !307 = !DILocalVariable(arg: 1, scope: !306, type: !7) +// CHECK:STDOUT: !308 = !DILocation(line: 7, column: 3, scope: !306) +// CHECK:STDOUT: !309 = !{!307} +// CHECK:STDOUT: !310 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a15077f50f3020c3:core.Destroy.Core", scope: null, file: !291, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !313) +// CHECK:STDOUT: !311 = !DILocalVariable(arg: 1, scope: !310, type: !7) +// CHECK:STDOUT: !312 = !DILocation(line: 7, column: 3, scope: !310) +// CHECK:STDOUT: !313 = !{!311} +// CHECK:STDOUT: !314 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !291, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !317) +// CHECK:STDOUT: !315 = !DILocalVariable(arg: 1, scope: !314, type: !7) +// CHECK:STDOUT: !316 = !DILocation(line: 7, column: 3, scope: !314) +// CHECK:STDOUT: !317 = !{!315} +// CHECK:STDOUT: !318 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !291, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !321) +// CHECK:STDOUT: !319 = !DILocalVariable(arg: 1, scope: !318, type: !7) +// CHECK:STDOUT: !320 = !DILocation(line: 7, column: 3, scope: !318) +// CHECK:STDOUT: !321 = !{!319} +// CHECK:STDOUT: !322 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !265, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !332) +// CHECK:STDOUT: !323 = !DILocalVariable(arg: 1, scope: !322, type: !7) +// CHECK:STDOUT: !324 = !DILocalVariable(arg: 2, scope: !322, type: !7) +// CHECK:STDOUT: !329 = !DILocation(line: 6, column: 10, scope: !322) +// CHECK:STDOUT: !330 = !DILocation(line: 6, column: 15, scope: !322) +// CHECK:STDOUT: !331 = !DILocation(line: 6, column: 3, scope: !322) +// CHECK:STDOUT: !332 = !{!323, !324} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index a76b618a6525..349f890362c2 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -46,31 +46,24 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !46 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -105,20 +98,16 @@ fn F() { // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !21) // CHECK:STDOUT: !46 = !DILocation(line: 16, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !21) // CHECK:STDOUT: !50 = !DILocation(line: 16, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !21) -// CHECK:STDOUT: !54 = !DILocation(line: 16, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/address_of_unused.carbon b/toolchain/lower/testdata/pointer/address_of_unused.carbon index b5248f1e6a02..9ff6ce2b0be7 100644 --- a/toolchain/lower/testdata/pointer/address_of_unused.carbon +++ b/toolchain/lower/testdata/pointer/address_of_unused.carbon @@ -36,18 +36,11 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !39 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -73,12 +66,8 @@ fn F() { // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !20) // CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !20) // CHECK:STDOUT: !37 = !DILocation(line: 14, column: 3, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !20) -// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 3, scope: !39) -// CHECK:STDOUT: !42 = !{!40} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/basic.carbon b/toolchain/lower/testdata/pointer/basic.carbon index d7500eee30d4..08a42ad0fac6 100644 --- a/toolchain/lower/testdata/pointer/basic.carbon +++ b/toolchain/lower/testdata/pointer/basic.carbon @@ -48,18 +48,11 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -94,12 +87,8 @@ fn F() -> i32 { // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) // CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) // CHECK:STDOUT: !52 = !DILocation(line: 18, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 18, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/numeric_literals.carbon b/toolchain/lower/testdata/primitives/numeric_literals.carbon index a20cbc3bb8b0..05632574d64d 100644 --- a/toolchain/lower/testdata/primitives/numeric_literals.carbon +++ b/toolchain/lower/testdata/primitives/numeric_literals.carbon @@ -67,63 +67,49 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !60 // CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self), !dbg !64 // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core"(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !80 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !80 // CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !82 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !84 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core"(ptr %self) #0 !dbg !86 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core"(ptr %self), !dbg !88 -// CHECK:STDOUT: ret void, !dbg !88 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -162,40 +148,32 @@ fn F() { // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !37) // CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !57) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !57) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !37) // CHECK:STDOUT: !56 = !DILocation(line: 22, column: 3, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !37) // CHECK:STDOUT: !60 = !DILocation(line: 22, column: 3, scope: !58) // CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !65) // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !37) // CHECK:STDOUT: !64 = !DILocation(line: 22, column: 3, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2891f36f5aa8bde4:core.Destroy.Core", scope: null, file: !32, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !37) -// CHECK:STDOUT: !68 = !DILocation(line: 22, column: 3, scope: !66) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !34) +// CHECK:STDOUT: !68 = !DILocation(line: 16, column: 3, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !34) // CHECK:STDOUT: !72 = !DILocation(line: 16, column: 3, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !77) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !34) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !77) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !37) // CHECK:STDOUT: !76 = !DILocation(line: 16, column: 3, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !34) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !37) // CHECK:STDOUT: !80 = !DILocation(line: 16, column: 3, scope: !78) // CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !37) -// CHECK:STDOUT: !84 = !DILocation(line: 16, column: 3, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.88cc3346b7991af5:core.Destroy.Core", scope: null, file: !32, line: 16, type: !39, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !37) -// CHECK:STDOUT: !88 = !DILocation(line: 16, column: 3, scope: !86) -// CHECK:STDOUT: !89 = !{!87} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/optional.carbon b/toolchain/lower/testdata/primitives/optional.carbon index d6134f05f569..8d82a822fe10 100644 --- a/toolchain/lower/testdata/primitives/optional.carbon +++ b/toolchain/lower/testdata/primitives/optional.carbon @@ -74,405 +74,370 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !25 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !25 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !29 { +// CHECK:STDOUT: define void @_CConvert.Main(ptr sret(<{ i32, i1 }>) %return, ptr %o) #0 !dbg !29 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !31 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvert.Main(ptr sret(<{ i32, i1 }>) %return, ptr %o) #0 !dbg !33 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.6e9e957697159b53(ptr %o), !dbg !38 -// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %if.then, label %if.else, !dbg !39 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.6e9e957697159b53(ptr %o), !dbg !34 +// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %if.then, label %if.else, !dbg !35 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Optional.Get.call = call ptr @_CGet.Optional.Core.6e9e957697159b53(ptr %o), !dbg !40 -// CHECK:STDOUT: %.loc5_12.2 = load i32, ptr %Optional.Get.call, align 4, !dbg !41 -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %.loc5_12.2), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: %Optional.Get.call = call ptr @_CGet.Optional.Core.6e9e957697159b53(ptr %o), !dbg !36 +// CHECK:STDOUT: %.loc5_12.2 = load i32, ptr %Optional.Get.call, align 4, !dbg !37 +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %.loc5_12.2), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @_CNone.Optional.Core.3530343734a6ea27(ptr %return), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: call void @_CNone.Optional.Core.3530343734a6ea27(ptr %return), !dbg !41 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAddOrRemoveConst.Main(i32 %a, i32 %b) #0 !dbg !50 { +// CHECK:STDOUT: define void @_CAddOrRemoveConst.Main(i32 %a, i32 %b) #0 !dbg !46 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %_.var.loc11 = alloca <{ i32, i1 }>, align 4, !dbg !51 +// CHECK:STDOUT: %_.var.loc12 = alloca <{ i32, i1 }>, align 4, !dbg !54 +// CHECK:STDOUT: %_.var.loc13 = alloca <{ i32, i1 }>, align 4, !dbg !57 +// CHECK:STDOUT: %_.var.loc14 = alloca <{ i32, i1 }>, align 4, !dbg !60 +// CHECK:STDOUT: %_.var.loc15 = alloca <{ i32, i1 }>, align 4, !dbg !63 +// CHECK:STDOUT: %_.var.loc16 = alloca <{ i32, i1 }>, align 4, !dbg !66 +// CHECK:STDOUT: %_.var.loc17 = alloca <{ i32, i1 }>, align 4, !dbg !69 +// CHECK:STDOUT: %_.var.loc18 = alloca <{ i32, i1 }>, align 4, !dbg !72 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc11), !dbg !51 +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %_.var.loc11, i32 %a), !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc12), !dbg !54 +// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr %_.var.loc12, i32 %a), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !57 +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %_.var.loc13, i32 %a), !dbg !57 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !60 +// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr %_.var.loc14, i32 %a), !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !63 +// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465"(ptr %_.var.loc15, i32 %b), !dbg !63 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !66 +// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821"(ptr %_.var.loc16, i32 %b), !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !69 +// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96"(ptr %_.var.loc17, i32 %b), !dbg !69 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !72 +// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77"(ptr %_.var.loc18, i32 %b), !dbg !72 +// CHECK:STDOUT: call void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %_.var.loc18), !dbg !72 +// CHECK:STDOUT: call void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %_.var.loc17), !dbg !69 +// CHECK:STDOUT: call void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %_.var.loc16), !dbg !66 +// CHECK:STDOUT: call void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %_.var.loc15), !dbg !63 +// CHECK:STDOUT: call void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %_.var.loc14), !dbg !60 +// CHECK:STDOUT: call void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %_.var.loc13), !dbg !57 +// CHECK:STDOUT: call void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %_.var.loc12), !dbg !54 +// CHECK:STDOUT: call void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %_.var.loc11), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc11 = alloca <{ i32, i1 }>, align 4, !dbg !55 -// CHECK:STDOUT: %_.var.loc12 = alloca <{ i32, i1 }>, align 4, !dbg !58 -// CHECK:STDOUT: %_.var.loc13 = alloca <{ i32, i1 }>, align 4, !dbg !61 -// CHECK:STDOUT: %_.var.loc14 = alloca <{ i32, i1 }>, align 4, !dbg !64 -// CHECK:STDOUT: %_.var.loc15 = alloca <{ i32, i1 }>, align 4, !dbg !67 -// CHECK:STDOUT: %_.var.loc16 = alloca <{ i32, i1 }>, align 4, !dbg !70 -// CHECK:STDOUT: %_.var.loc17 = alloca <{ i32, i1 }>, align 4, !dbg !73 -// CHECK:STDOUT: %_.var.loc18 = alloca <{ i32, i1 }>, align 4, !dbg !76 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc11), !dbg !55 -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %_.var.loc11, i32 %a), !dbg !55 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc12), !dbg !58 -// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr %_.var.loc12, i32 %a), !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !61 -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %_.var.loc13, i32 %a), !dbg !61 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !64 -// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr %_.var.loc14, i32 %a), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !67 -// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465"(ptr %_.var.loc15, i32 %b), !dbg !67 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !70 -// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821"(ptr %_.var.loc16, i32 %b), !dbg !70 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !73 -// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96"(ptr %_.var.loc17, i32 %b), !dbg !73 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !76 -// CHECK:STDOUT: call void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77"(ptr %_.var.loc18, i32 %b), !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %_.var.loc18), !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %_.var.loc17), !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %_.var.loc16), !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %_.var.loc15), !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %_.var.loc14), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %_.var.loc13), !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %_.var.loc12), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %_.var.loc11), !dbg !55 // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core"(ptr %self) #0 !dbg !81 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core"(ptr %self), !dbg !83 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core"(ptr %self), !dbg !87 // CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self), !dbg !91 // CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self) #0 !dbg !93 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ef6922493c513f55:core.Destroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core"(ptr %self), !dbg !95 // CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.ef6922493c513f55:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ef6922493c513f55:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core"(ptr %self) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.ef6922493c513f55:core.Destroy.Core"(ptr %self), !dbg !103 // CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6854f843fd23bc45:core.Destroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core"(ptr %self), !dbg !107 // CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core"(ptr %self) #0 !dbg !109 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6854f843fd23bc45:core.Destroy.Core"(ptr %self) #0 !dbg !113 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d81dc56afe745c8e:core.Destroy.Core"(ptr %self) #0 !dbg !113 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core"(ptr %self), !dbg !115 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core"(ptr %self), !dbg !115 // CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core"(ptr %self) #0 !dbg !117 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %self) #0 !dbg !117 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d81dc56afe745c8e:core.Destroy.Core"(ptr %self) #0 !dbg !121 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core"(ptr %self) #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core"(ptr %self), !dbg !123 // CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.60848ede08716e91:core.Destroy.Core"(ptr %self) #0 !dbg !125 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %self) #0 !dbg !125 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core"(ptr %self), !dbg !127 // CHECK:STDOUT: ret void, !dbg !127 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.60848ede08716e91:core.Destroy.Core"(ptr %self) #0 !dbg !129 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.60848ede08716e91:core.Destroy.Core"(ptr %self), !dbg !131 // CHECK:STDOUT: ret void, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core"(ptr %self) #0 !dbg !133 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !133 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !135 // CHECK:STDOUT: ret void, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b90699303d3716f5:core.Destroy.Core"(ptr %self) #0 !dbg !137 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core"(ptr %self), !dbg !139 // CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !141 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !141 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self) #0 !dbg !145 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core"(ptr %self), !dbg !147 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !147 // CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !149 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core"(ptr %self) #0 !dbg !149 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51569357b34b54dc:core.Destroy.Core"(ptr %self) #0 !dbg !153 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9f155f365c9e4267:core.Destroy.Core"(ptr %self) #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core"(ptr %self), !dbg !155 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core"(ptr %self), !dbg !155 // CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !157 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %self) #0 !dbg !157 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core"(ptr %self) #0 !dbg !161 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core"(ptr %self) #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core"(ptr %self), !dbg !163 // CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core"(ptr %self) #0 !dbg !165 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %self) #0 !dbg !165 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core"(ptr %self), !dbg !167 // CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9f155f365c9e4267:core.Destroy.Core"(ptr %self) #0 !dbg !169 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core"(ptr %self), !dbg !171 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.6e9e957697159b53(ptr %self) #0 !dbg !169 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %self), !dbg !175 +// CHECK:STDOUT: ret i1 %1, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0acefe5e4ad33694:core.Destroy.Core"(ptr %self) #0 !dbg !173 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.6e9e957697159b53(ptr %self) #0 !dbg !178 { +// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %self), !dbg !184 +// CHECK:STDOUT: ret ptr %1, !dbg !185 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core"(ptr %self) #0 !dbg !177 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0acefe5e4ad33694:core.Destroy.Core"(ptr %self), !dbg !179 -// CHECK:STDOUT: ret void, !dbg !179 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !187 { +// CHECK:STDOUT: call void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27"(ptr %return, i32 %self), !dbg !192 +// CHECK:STDOUT: ret void, !dbg !193 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core"(ptr %self) #0 !dbg !181 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !183 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core"(ptr %self) #0 !dbg !185 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core"(ptr %self), !dbg !187 -// CHECK:STDOUT: ret void, !dbg !187 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.6e9e957697159b53(ptr %self) #0 !dbg !189 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %self), !dbg !195 -// CHECK:STDOUT: ret i1 %1, !dbg !196 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.6e9e957697159b53(ptr %self) #0 !dbg !198 { -// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %self), !dbg !204 -// CHECK:STDOUT: ret ptr %1, !dbg !205 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !207 { -// CHECK:STDOUT: call void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27"(ptr %return, i32 %self), !dbg !212 -// CHECK:STDOUT: ret void, !dbg !213 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.3530343734a6ea27(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !215 { -// CHECK:STDOUT: call void @"_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr %return), !dbg !218 -// CHECK:STDOUT: ret void, !dbg !219 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.3530343734a6ea27(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !195 { +// CHECK:STDOUT: call void @"_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr %return), !dbg !198 +// CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !221 { -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %self), !dbg !226 -// CHECK:STDOUT: ret void, !dbg !227 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !201 { +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %self), !dbg !206 +// CHECK:STDOUT: ret void, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !229 { -// CHECK:STDOUT: call void @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7"(ptr %return, i32 %self), !dbg !234 -// CHECK:STDOUT: ret void, !dbg !235 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !209 { +// CHECK:STDOUT: call void @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7"(ptr %return, i32 %self), !dbg !214 +// CHECK:STDOUT: ret void, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !237 { -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %return, i32 %self), !dbg !242 -// CHECK:STDOUT: ret void, !dbg !243 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !217 { +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %return, i32 %self), !dbg !222 +// CHECK:STDOUT: ret void, !dbg !223 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !245 { -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %self), !dbg !251 -// CHECK:STDOUT: ret void, !dbg !252 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !225 { +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843"(ptr %return, i32 %self), !dbg !231 +// CHECK:STDOUT: ret void, !dbg !232 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !254 { -// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr %return, i32 %self), !dbg !260 -// CHECK:STDOUT: ret void, !dbg !261 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !234 { +// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465"(ptr %return, i32 %self), !dbg !240 +// CHECK:STDOUT: ret void, !dbg !241 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !263 { -// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %return, i32 %self), !dbg !269 -// CHECK:STDOUT: ret void, !dbg !270 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !243 { +// CHECK:STDOUT: call void @"_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224"(ptr %return, i32 %self), !dbg !249 +// CHECK:STDOUT: ret void, !dbg !250 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !272 { -// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr %return, i32 %self), !dbg !278 -// CHECK:STDOUT: ret void, !dbg !279 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !252 { +// CHECK:STDOUT: call void @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96"(ptr %return, i32 %self), !dbg !258 +// CHECK:STDOUT: ret void, !dbg !259 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %value) #0 !dbg !281 { -// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !287 -// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !288 -// CHECK:STDOUT: ret i1 %2, !dbg !289 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %value) #0 !dbg !261 { +// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !267 +// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !268 +// CHECK:STDOUT: ret i1 %2, !dbg !269 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %value) #0 !dbg !291 { -// CHECK:STDOUT: ret ptr %value, !dbg !297 +// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba"(ptr %value) #0 !dbg !271 { +// CHECK:STDOUT: ret ptr %value, !dbg !277 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !299 { -// CHECK:STDOUT: call void @_CSome.Optional.Core.3530343734a6ea27(ptr %return, i32 %self), !dbg !305 -// CHECK:STDOUT: ret void, !dbg !306 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !279 { +// CHECK:STDOUT: call void @_CSome.Optional.Core.3530343734a6ea27(ptr %return, i32 %self), !dbg !285 +// CHECK:STDOUT: ret void, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !308 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !315 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !315 -// CHECK:STDOUT: ret void, !dbg !316 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !288 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !295 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !295 +// CHECK:STDOUT: ret void, !dbg !296 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !317 { -// CHECK:STDOUT: %temp = alloca i32, align 4, !dbg !322 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !322 -// CHECK:STDOUT: %1 = call i32 @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2"(i32 %self), !dbg !322 -// CHECK:STDOUT: store i32 %1, ptr %temp, align 4, !dbg !322 -// CHECK:STDOUT: %2 = load i32, ptr %temp, align 4, !dbg !322 -// CHECK:STDOUT: call void @_CSome.Optional.Core.00b00ea46fa3b046(ptr %return, i32 %2), !dbg !323 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core"(ptr %temp), !dbg !322 -// CHECK:STDOUT: ret void, !dbg !324 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !297 { +// CHECK:STDOUT: %temp = alloca i32, align 4, !dbg !302 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !302 +// CHECK:STDOUT: %1 = call i32 @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2"(i32 %self), !dbg !302 +// CHECK:STDOUT: store i32 %1, ptr %temp, align 4, !dbg !302 +// CHECK:STDOUT: %2 = load i32, ptr %temp, align 4, !dbg !302 +// CHECK:STDOUT: call void @_CSome.Optional.Core.00b00ea46fa3b046(ptr %return, i32 %2), !dbg !303 +// CHECK:STDOUT: call void @"_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core"(ptr %temp), !dbg !302 +// CHECK:STDOUT: ret void, !dbg !304 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.3530343734a6ea27(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !326 { -// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr %return, i32 %value), !dbg !331 -// CHECK:STDOUT: ret void, !dbg !332 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.3530343734a6ea27(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !306 { +// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr %return, i32 %value), !dbg !311 +// CHECK:STDOUT: ret void, !dbg !312 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2"(i32 %self) #0 !dbg !334 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self), !dbg !339 -// CHECK:STDOUT: ret i32 %1, !dbg !342 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2"(i32 %self) #0 !dbg !314 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self), !dbg !319 +// CHECK:STDOUT: ret i32 %1, !dbg !322 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.00b00ea46fa3b046(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !344 { -// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2"(ptr %return, i32 %value), !dbg !349 -// CHECK:STDOUT: ret void, !dbg !350 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.00b00ea46fa3b046(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !324 { +// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2"(ptr %return, i32 %value), !dbg !329 +// CHECK:STDOUT: ret void, !dbg !330 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !352 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !361 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !361 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !363 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !363 -// CHECK:STDOUT: ret void, !dbg !364 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !332 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !341 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !341 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !343 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !343 +// CHECK:STDOUT: ret void, !dbg !344 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !367 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !372 -// CHECK:STDOUT: ret i32 %1, !dbg !374 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044"(i32 %self) #0 !dbg !347 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !352 +// CHECK:STDOUT: ret i32 %1, !dbg !354 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !376 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !385 -// CHECK:STDOUT: %1 = call i32 @"_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4"(i32 %self), !dbg !386 -// CHECK:STDOUT: store i32 %1, ptr %value, align 4, !dbg !385 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !387 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !387 -// CHECK:STDOUT: ret void, !dbg !388 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !356 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !365 +// CHECK:STDOUT: %1 = call i32 @"_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4"(i32 %self), !dbg !366 +// CHECK:STDOUT: store i32 %1, ptr %value, align 4, !dbg !365 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !367 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !367 +// CHECK:STDOUT: ret void, !dbg !368 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !390 { -// CHECK:STDOUT: ret i32 %self, !dbg !396 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !370 { +// CHECK:STDOUT: ret i32 %self, !dbg !376 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4"(i32 %self) #0 !dbg !399 { -// CHECK:STDOUT: ret i32 %self, !dbg !406 +// CHECK:STDOUT: define linkonce_odr i32 @"_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4"(i32 %self) #0 !dbg !379 { +// CHECK:STDOUT: ret i32 %self, !dbg !386 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -512,272 +477,252 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !6) // CHECK:STDOUT: !23 = !DILocation(line: 3, column: 39, scope: !21) // CHECK:STDOUT: !24 = !{!22} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !6) // CHECK:STDOUT: !27 = !DILocation(line: 3, column: 39, scope: !25) // CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) -// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !6) -// CHECK:STDOUT: !31 = !DILocation(line: 3, column: 39, scope: !29) -// CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !4, line: 3, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) -// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !7) -// CHECK:STDOUT: !38 = !DILocation(line: 4, column: 7, scope: !33) -// CHECK:STDOUT: !39 = !DILocation(line: 4, column: 6, scope: !33) -// CHECK:STDOUT: !40 = !DILocation(line: 5, column: 13, scope: !33) -// CHECK:STDOUT: !41 = !DILocation(line: 5, column: 12, scope: !33) -// CHECK:STDOUT: !42 = !DILocation(line: 5, column: 5, scope: !33) -// CHECK:STDOUT: !43 = !{!7, !6} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !DILocation(line: 7, column: 10, scope: !33) -// CHECK:STDOUT: !46 = !{!7} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = !DILocation(line: 7, column: 3, scope: !33) -// CHECK:STDOUT: !49 = !{!34} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !4, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !6) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !6) -// CHECK:STDOUT: !55 = !DILocation(line: 11, column: 3, scope: !50) -// CHECK:STDOUT: !58 = !DILocation(line: 12, column: 3, scope: !50) -// CHECK:STDOUT: !61 = !DILocation(line: 13, column: 3, scope: !50) -// CHECK:STDOUT: !64 = !DILocation(line: 14, column: 3, scope: !50) -// CHECK:STDOUT: !67 = !DILocation(line: 15, column: 3, scope: !50) -// CHECK:STDOUT: !70 = !DILocation(line: 16, column: 3, scope: !50) -// CHECK:STDOUT: !73 = !DILocation(line: 17, column: 3, scope: !50) -// CHECK:STDOUT: !76 = !DILocation(line: 18, column: 3, scope: !50) -// CHECK:STDOUT: !79 = !DILocation(line: 10, column: 1, scope: !50) -// CHECK:STDOUT: !80 = !{!51, !52} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core", scope: null, file: !4, line: 13, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !4, line: 3, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) +// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !7) +// CHECK:STDOUT: !34 = !DILocation(line: 4, column: 7, scope: !29) +// CHECK:STDOUT: !35 = !DILocation(line: 4, column: 6, scope: !29) +// CHECK:STDOUT: !36 = !DILocation(line: 5, column: 13, scope: !29) +// CHECK:STDOUT: !37 = !DILocation(line: 5, column: 12, scope: !29) +// CHECK:STDOUT: !38 = !DILocation(line: 5, column: 5, scope: !29) +// CHECK:STDOUT: !39 = !{!7, !6} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DILocation(line: 7, column: 10, scope: !29) +// CHECK:STDOUT: !42 = !{!7} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 7, column: 3, scope: !29) +// CHECK:STDOUT: !45 = !{!30} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !4, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !6) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 2, scope: !46, type: !6) +// CHECK:STDOUT: !51 = !DILocation(line: 11, column: 3, scope: !46) +// CHECK:STDOUT: !54 = !DILocation(line: 12, column: 3, scope: !46) +// CHECK:STDOUT: !57 = !DILocation(line: 13, column: 3, scope: !46) +// CHECK:STDOUT: !60 = !DILocation(line: 14, column: 3, scope: !46) +// CHECK:STDOUT: !63 = !DILocation(line: 15, column: 3, scope: !46) +// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !46) +// CHECK:STDOUT: !69 = !DILocation(line: 17, column: 3, scope: !46) +// CHECK:STDOUT: !72 = !DILocation(line: 18, column: 3, scope: !46) +// CHECK:STDOUT: !75 = !DILocation(line: 10, column: 1, scope: !46) +// CHECK:STDOUT: !76 = !{!47, !48} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a8d754fe1453eab:core.Destroy.Core", scope: null, file: !4, line: 13, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) +// CHECK:STDOUT: !79 = !DILocation(line: 13, column: 10, scope: !77) +// CHECK:STDOUT: !80 = !{!78} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core", scope: null, file: !4, line: 13, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !7) // CHECK:STDOUT: !83 = !DILocation(line: 13, column: 10, scope: !81) // CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6a8d754fe1453eab:core.Destroy.Core", scope: null, file: !4, line: 13, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) -// CHECK:STDOUT: !87 = !DILocation(line: 13, column: 10, scope: !85) +// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 3, scope: !85) // CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.96a347e4ca9c10e1:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.96a347e4ca9c10e1:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) // CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !7) // CHECK:STDOUT: !91 = !DILocation(line: 18, column: 3, scope: !89) // CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.96a347e4ca9c10e1:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ef6922493c513f55:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) // CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !7) // CHECK:STDOUT: !95 = !DILocation(line: 18, column: 3, scope: !93) // CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.ef6922493c513f55:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) // CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !7) // CHECK:STDOUT: !99 = !DILocation(line: 18, column: 3, scope: !97) // CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ef6922493c513f55:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !7) // CHECK:STDOUT: !103 = !DILocation(line: 18, column: 3, scope: !101) // CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6854f843fd23bc45:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !7) // CHECK:STDOUT: !107 = !DILocation(line: 18, column: 3, scope: !105) // CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6854f843fd23bc45:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !112) // CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !7) // CHECK:STDOUT: !111 = !DILocation(line: 18, column: 3, scope: !109) // CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6854f843fd23bc45:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !116) +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d81dc56afe745c8e:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !116) // CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !7) // CHECK:STDOUT: !115 = !DILocation(line: 18, column: 3, scope: !113) // CHECK:STDOUT: !116 = !{!114} -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d81dc56afe745c8e:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.60848ede08716e91:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) // CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !7) // CHECK:STDOUT: !119 = !DILocation(line: 18, column: 3, scope: !117) // CHECK:STDOUT: !120 = !{!118} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d81dc56afe745c8e:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !124) +// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !124) // CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !7) // CHECK:STDOUT: !123 = !DILocation(line: 18, column: 3, scope: !121) // CHECK:STDOUT: !124 = !{!122} -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.60848ede08716e91:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b90699303d3716f5:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) // CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !7) // CHECK:STDOUT: !127 = !DILocation(line: 18, column: 3, scope: !125) // CHECK:STDOUT: !128 = !{!126} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.60848ede08716e91:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) // CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !7) -// CHECK:STDOUT: !131 = !DILocation(line: 18, column: 3, scope: !129) +// CHECK:STDOUT: !131 = !DILocation(line: 16, column: 3, scope: !129) // CHECK:STDOUT: !132 = !{!130} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b90699303d3716f5:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !136) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !136) // CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !7) -// CHECK:STDOUT: !135 = !DILocation(line: 18, column: 3, scope: !133) +// CHECK:STDOUT: !135 = !DILocation(line: 16, column: 3, scope: !133) // CHECK:STDOUT: !136 = !{!134} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b90699303d3716f5:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !7) -// CHECK:STDOUT: !139 = !DILocation(line: 18, column: 3, scope: !137) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !6) +// CHECK:STDOUT: !139 = !DILocation(line: 16, column: 3, scope: !137) // CHECK:STDOUT: !140 = !{!138} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) // CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !7) // CHECK:STDOUT: !143 = !DILocation(line: 16, column: 3, scope: !141) // CHECK:STDOUT: !144 = !{!142} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1d6a7672bf2f14c6:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) // CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !7) // CHECK:STDOUT: !147 = !DILocation(line: 16, column: 3, scope: !145) // CHECK:STDOUT: !148 = !{!146} -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !7) // CHECK:STDOUT: !151 = !DILocation(line: 16, column: 3, scope: !149) // CHECK:STDOUT: !152 = !{!150} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51569357b34b54dc:core.Destroy.Core", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !6) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9f155f365c9e4267:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !7) // CHECK:STDOUT: !155 = !DILocation(line: 16, column: 3, scope: !153) // CHECK:STDOUT: !156 = !{!154} -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !160) +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !160) // CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !7) // CHECK:STDOUT: !159 = !DILocation(line: 16, column: 3, scope: !157) // CHECK:STDOUT: !160 = !{!158} -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f6a63055ea5a1824:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) // CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !7) // CHECK:STDOUT: !163 = !DILocation(line: 16, column: 3, scope: !161) // CHECK:STDOUT: !164 = !{!162} -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9f155f365c9e4267:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !168) +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !168) // CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !7) // CHECK:STDOUT: !167 = !DILocation(line: 16, column: 3, scope: !165) // CHECK:STDOUT: !168 = !{!166} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9f155f365c9e4267:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !172) +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.6e9e957697159b53", scope: null, file: !16, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) // CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !7) -// CHECK:STDOUT: !171 = !DILocation(line: 16, column: 3, scope: !169) -// CHECK:STDOUT: !172 = !{!170} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0acefe5e4ad33694:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !176) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !7) -// CHECK:STDOUT: !175 = !DILocation(line: 16, column: 3, scope: !173) -// CHECK:STDOUT: !176 = !{!174} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0acefe5e4ad33694:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !180) -// CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !7) -// CHECK:STDOUT: !179 = !DILocation(line: 16, column: 3, scope: !177) -// CHECK:STDOUT: !180 = !{!178} -// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.65ac38c7f841b05c:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !184) -// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !7) -// CHECK:STDOUT: !183 = !DILocation(line: 16, column: 3, scope: !181) -// CHECK:STDOUT: !184 = !{!182} -// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.65ac38c7f841b05c:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !188) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !7) -// CHECK:STDOUT: !187 = !DILocation(line: 16, column: 3, scope: !185) -// CHECK:STDOUT: !188 = !{!186} -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.6e9e957697159b53", scope: null, file: !16, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !197) -// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !7) -// CHECK:STDOUT: !195 = !DILocation(line: 37, column: 12, scope: !189) -// CHECK:STDOUT: !196 = !DILocation(line: 37, column: 5, scope: !189) -// CHECK:STDOUT: !197 = !{!190} -// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.6e9e957697159b53", scope: null, file: !16, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !206) -// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !7) -// CHECK:STDOUT: !204 = !DILocation(line: 40, column: 12, scope: !198) -// CHECK:STDOUT: !205 = !DILocation(line: 40, column: 5, scope: !198) -// CHECK:STDOUT: !206 = !{!199} -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843", scope: null, file: !16, line: 105, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !6) -// CHECK:STDOUT: !212 = !DILocation(line: 106, column: 12, scope: !207) -// CHECK:STDOUT: !213 = !DILocation(line: 106, column: 5, scope: !207) -// CHECK:STDOUT: !214 = !{!208} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.3530343734a6ea27", scope: null, file: !16, line: 30, type: !47, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !218 = !DILocation(line: 31, column: 12, scope: !215) -// CHECK:STDOUT: !219 = !DILocation(line: 31, column: 5, scope: !215) -// CHECK:STDOUT: !220 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "") -// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465", scope: null, file: !220, line: 43, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !228) -// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !6) -// CHECK:STDOUT: !226 = !DILocation(line: 43, column: 40, scope: !221) -// CHECK:STDOUT: !227 = !DILocation(line: 43, column: 33, scope: !221) -// CHECK:STDOUT: !228 = !{!222} -// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224", scope: null, file: !16, line: 105, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !236) -// CHECK:STDOUT: !230 = !DILocalVariable(arg: 1, scope: !229, type: !6) -// CHECK:STDOUT: !234 = !DILocation(line: 106, column: 12, scope: !229) -// CHECK:STDOUT: !235 = !DILocation(line: 106, column: 5, scope: !229) -// CHECK:STDOUT: !236 = !{!230} -// CHECK:STDOUT: !237 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96", scope: null, file: !220, line: 43, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !244) -// CHECK:STDOUT: !238 = !DILocalVariable(arg: 1, scope: !237, type: !6) -// CHECK:STDOUT: !242 = !DILocation(line: 43, column: 40, scope: !237) -// CHECK:STDOUT: !243 = !DILocation(line: 43, column: 33, scope: !237) -// CHECK:STDOUT: !244 = !{!238} -// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465", scope: null, file: !220, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !253) -// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !6) -// CHECK:STDOUT: !251 = !DILocation(line: 47, column: 34, scope: !245) -// CHECK:STDOUT: !252 = !DILocation(line: 47, column: 27, scope: !245) -// CHECK:STDOUT: !253 = !{!246} -// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821", scope: null, file: !220, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !262) -// CHECK:STDOUT: !255 = !DILocalVariable(arg: 1, scope: !254, type: !6) -// CHECK:STDOUT: !260 = !DILocation(line: 47, column: 34, scope: !254) -// CHECK:STDOUT: !261 = !DILocation(line: 47, column: 27, scope: !254) -// CHECK:STDOUT: !262 = !{!255} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96", scope: null, file: !220, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !271) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !6) -// CHECK:STDOUT: !269 = !DILocation(line: 47, column: 34, scope: !263) -// CHECK:STDOUT: !270 = !DILocation(line: 47, column: 27, scope: !263) -// CHECK:STDOUT: !271 = !{!264} -// CHECK:STDOUT: !272 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77", scope: null, file: !220, line: 47, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !280) -// CHECK:STDOUT: !273 = !DILocalVariable(arg: 1, scope: !272, type: !6) -// CHECK:STDOUT: !278 = !DILocation(line: 47, column: 34, scope: !272) -// CHECK:STDOUT: !279 = !DILocation(line: 47, column: 27, scope: !272) -// CHECK:STDOUT: !280 = !{!273} -// CHECK:STDOUT: !281 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !16, line: 172, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !290) -// CHECK:STDOUT: !282 = !DILocalVariable(arg: 1, scope: !281, type: !7) -// CHECK:STDOUT: !287 = !DILocation(line: 173, column: 16, scope: !281) -// CHECK:STDOUT: !288 = !DILocation(line: 173, column: 12, scope: !281) -// CHECK:STDOUT: !289 = !DILocation(line: 173, column: 5, scope: !281) -// CHECK:STDOUT: !290 = !{!282} -// CHECK:STDOUT: !291 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !16, line: 175, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !298) -// CHECK:STDOUT: !292 = !DILocalVariable(arg: 1, scope: !291, type: !7) -// CHECK:STDOUT: !297 = !DILocation(line: 176, column: 5, scope: !291) -// CHECK:STDOUT: !298 = !{!292} -// CHECK:STDOUT: !299 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27", scope: null, file: !16, line: 80, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !307) -// CHECK:STDOUT: !300 = !DILocalVariable(arg: 1, scope: !299, type: !6) -// CHECK:STDOUT: !305 = !DILocation(line: 81, column: 12, scope: !299) -// CHECK:STDOUT: !306 = !DILocation(line: 81, column: 5, scope: !299) -// CHECK:STDOUT: !307 = !{!300} -// CHECK:STDOUT: !308 = distinct !DISubprogram(name: "None", linkageName: "_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc", scope: null, file: !16, line: 125, type: !47, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !315 = !DILocation(line: 128, column: 5, scope: !308) -// CHECK:STDOUT: !316 = !DILocation(line: 129, column: 5, scope: !308) -// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7", scope: null, file: !16, line: 87, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !325) -// CHECK:STDOUT: !318 = !DILocalVariable(arg: 1, scope: !317, type: !6) -// CHECK:STDOUT: !322 = !DILocation(line: 88, column: 29, scope: !317) -// CHECK:STDOUT: !323 = !DILocation(line: 88, column: 12, scope: !317) -// CHECK:STDOUT: !324 = !DILocation(line: 88, column: 5, scope: !317) -// CHECK:STDOUT: !325 = !{!318} -// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.3530343734a6ea27", scope: null, file: !16, line: 33, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !333) -// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !6) -// CHECK:STDOUT: !331 = !DILocation(line: 34, column: 12, scope: !326) -// CHECK:STDOUT: !332 = !DILocation(line: 34, column: 5, scope: !326) -// CHECK:STDOUT: !333 = !{!327} -// CHECK:STDOUT: !334 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2", scope: null, file: !220, line: 43, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !343) -// CHECK:STDOUT: !335 = !DILocalVariable(arg: 1, scope: !334, type: !6) -// CHECK:STDOUT: !339 = !DILocation(line: 43, column: 40, scope: !334) -// CHECK:STDOUT: !340 = !{!6, !6} -// CHECK:STDOUT: !341 = !DISubroutineType(types: !340) -// CHECK:STDOUT: !342 = !DILocation(line: 43, column: 33, scope: !334) -// CHECK:STDOUT: !343 = !{!335} -// CHECK:STDOUT: !344 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.00b00ea46fa3b046", scope: null, file: !16, line: 33, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !351) -// CHECK:STDOUT: !345 = !DILocalVariable(arg: 1, scope: !344, type: !6) -// CHECK:STDOUT: !349 = !DILocation(line: 34, column: 12, scope: !344) -// CHECK:STDOUT: !350 = !DILocation(line: 34, column: 5, scope: !344) -// CHECK:STDOUT: !351 = !{!345} -// CHECK:STDOUT: !352 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc", scope: null, file: !16, line: 131, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !365) -// CHECK:STDOUT: !353 = !DILocalVariable(arg: 1, scope: !352, type: !6) -// CHECK:STDOUT: !361 = !DILocation(line: 137, column: 5, scope: !352) -// CHECK:STDOUT: !363 = !DILocation(line: 138, column: 5, scope: !352) -// CHECK:STDOUT: !364 = !DILocation(line: 139, column: 5, scope: !352) -// CHECK:STDOUT: !365 = !{!353} -// CHECK:STDOUT: !366 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !367 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !366, line: 64, type: !341, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !375) -// CHECK:STDOUT: !368 = !DILocalVariable(arg: 1, scope: !367, type: !6) -// CHECK:STDOUT: !372 = !DILocation(line: 66, column: 17, scope: !367) -// CHECK:STDOUT: !374 = !DILocation(line: 66, column: 5, scope: !367) -// CHECK:STDOUT: !375 = !{!368} -// CHECK:STDOUT: !376 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2", scope: null, file: !16, line: 131, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !389) -// CHECK:STDOUT: !377 = !DILocalVariable(arg: 1, scope: !376, type: !6) -// CHECK:STDOUT: !385 = !DILocation(line: 137, column: 5, scope: !376) -// CHECK:STDOUT: !386 = !DILocation(line: 137, column: 28, scope: !376) -// CHECK:STDOUT: !387 = !DILocation(line: 138, column: 5, scope: !376) -// CHECK:STDOUT: !388 = !DILocation(line: 139, column: 5, scope: !376) -// CHECK:STDOUT: !389 = !{!377} -// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !366, line: 59, type: !341, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !397) -// CHECK:STDOUT: !391 = !DILocalVariable(arg: 1, scope: !390, type: !6) -// CHECK:STDOUT: !396 = !DILocation(line: 59, column: 28, scope: !390) -// CHECK:STDOUT: !397 = !{!391} -// CHECK:STDOUT: !398 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") -// CHECK:STDOUT: !399 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4", scope: null, file: !398, line: 23, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !407) -// CHECK:STDOUT: !400 = !DILocalVariable(arg: 1, scope: !399, type: !6) -// CHECK:STDOUT: !406 = !DILocation(line: 23, column: 25, scope: !399) -// CHECK:STDOUT: !407 = !{!400} +// CHECK:STDOUT: !175 = !DILocation(line: 37, column: 12, scope: !169) +// CHECK:STDOUT: !176 = !DILocation(line: 37, column: 5, scope: !169) +// CHECK:STDOUT: !177 = !{!170} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.6e9e957697159b53", scope: null, file: !16, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !186) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !7) +// CHECK:STDOUT: !184 = !DILocation(line: 40, column: 12, scope: !178) +// CHECK:STDOUT: !185 = !DILocation(line: 40, column: 5, scope: !178) +// CHECK:STDOUT: !186 = !{!179} +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.9eebcd25770b8843", scope: null, file: !16, line: 105, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !194) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !6) +// CHECK:STDOUT: !192 = !DILocation(line: 106, column: 12, scope: !187) +// CHECK:STDOUT: !193 = !DILocation(line: 106, column: 5, scope: !187) +// CHECK:STDOUT: !194 = !{!188} +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.3530343734a6ea27", scope: null, file: !16, line: 30, type: !43, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !198 = !DILocation(line: 31, column: 12, scope: !195) +// CHECK:STDOUT: !199 = !DILocation(line: 31, column: 5, scope: !195) +// CHECK:STDOUT: !200 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "") +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.27a2d1ef6dd68465", scope: null, file: !200, line: 43, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !208) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6) +// CHECK:STDOUT: !206 = !DILocation(line: 43, column: 40, scope: !201) +// CHECK:STDOUT: !207 = !DILocation(line: 43, column: 33, scope: !201) +// CHECK:STDOUT: !208 = !{!202} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.538322f9fda4254f:ImplicitAs.a276ba298c70ba87.Core.5cec6441aa655224", scope: null, file: !16, line: 105, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !216) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) +// CHECK:STDOUT: !214 = !DILocation(line: 106, column: 12, scope: !209) +// CHECK:STDOUT: !215 = !DILocation(line: 106, column: 5, scope: !209) +// CHECK:STDOUT: !216 = !{!210} +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.bc0e935618dc3a96", scope: null, file: !200, line: 43, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !224) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !6) +// CHECK:STDOUT: !222 = !DILocation(line: 43, column: 40, scope: !217) +// CHECK:STDOUT: !223 = !DILocation(line: 43, column: 33, scope: !217) +// CHECK:STDOUT: !224 = !{!218} +// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.27a2d1ef6dd68465", scope: null, file: !200, line: 47, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !233) +// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !6) +// CHECK:STDOUT: !231 = !DILocation(line: 47, column: 34, scope: !225) +// CHECK:STDOUT: !232 = !DILocation(line: 47, column: 27, scope: !225) +// CHECK:STDOUT: !233 = !{!226} +// CHECK:STDOUT: !234 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.9f04190beae22821", scope: null, file: !200, line: 47, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !242) +// CHECK:STDOUT: !235 = !DILocalVariable(arg: 1, scope: !234, type: !6) +// CHECK:STDOUT: !240 = !DILocation(line: 47, column: 34, scope: !234) +// CHECK:STDOUT: !241 = !DILocation(line: 47, column: 27, scope: !234) +// CHECK:STDOUT: !242 = !{!235} +// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.bc0e935618dc3a96", scope: null, file: !200, line: 47, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !251) +// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !6) +// CHECK:STDOUT: !249 = !DILocation(line: 47, column: 34, scope: !243) +// CHECK:STDOUT: !250 = !DILocation(line: 47, column: 27, scope: !243) +// CHECK:STDOUT: !251 = !{!244} +// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.c18e58a62bf591fb:ImplicitAs.eb057aa32837c84e.Core.342679e541375c77", scope: null, file: !200, line: 47, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !260) +// CHECK:STDOUT: !253 = !DILocalVariable(arg: 1, scope: !252, type: !6) +// CHECK:STDOUT: !258 = !DILocation(line: 47, column: 34, scope: !252) +// CHECK:STDOUT: !259 = !DILocation(line: 47, column: 27, scope: !252) +// CHECK:STDOUT: !260 = !{!253} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !16, line: 172, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !270) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !7) +// CHECK:STDOUT: !267 = !DILocation(line: 173, column: 16, scope: !261) +// CHECK:STDOUT: !268 = !DILocation(line: 173, column: 12, scope: !261) +// CHECK:STDOUT: !269 = !DILocation(line: 173, column: 5, scope: !261) +// CHECK:STDOUT: !270 = !{!262} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.84588f41d61dafba", scope: null, file: !16, line: 175, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !278) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !7) +// CHECK:STDOUT: !277 = !DILocation(line: 176, column: 5, scope: !271) +// CHECK:STDOUT: !278 = !{!272} +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.3530343734a6ea27", scope: null, file: !16, line: 80, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !287) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !6) +// CHECK:STDOUT: !285 = !DILocation(line: 81, column: 12, scope: !279) +// CHECK:STDOUT: !286 = !DILocation(line: 81, column: 5, scope: !279) +// CHECK:STDOUT: !287 = !{!280} +// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "None", linkageName: "_CNone.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc", scope: null, file: !16, line: 125, type: !43, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !295 = !DILocation(line: 128, column: 5, scope: !288) +// CHECK:STDOUT: !296 = !DILocation(line: 129, column: 5, scope: !288) +// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.d62727437df45535:OptionalAs.1dac4564233fecd1.Core.dd5a2a74150e1fc7", scope: null, file: !16, line: 87, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !305) +// CHECK:STDOUT: !298 = !DILocalVariable(arg: 1, scope: !297, type: !6) +// CHECK:STDOUT: !302 = !DILocation(line: 88, column: 29, scope: !297) +// CHECK:STDOUT: !303 = !DILocation(line: 88, column: 12, scope: !297) +// CHECK:STDOUT: !304 = !DILocation(line: 88, column: 5, scope: !297) +// CHECK:STDOUT: !305 = !{!298} +// CHECK:STDOUT: !306 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.3530343734a6ea27", scope: null, file: !16, line: 33, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !313) +// CHECK:STDOUT: !307 = !DILocalVariable(arg: 1, scope: !306, type: !6) +// CHECK:STDOUT: !311 = !DILocation(line: 34, column: 12, scope: !306) +// CHECK:STDOUT: !312 = !DILocation(line: 34, column: 5, scope: !306) +// CHECK:STDOUT: !313 = !{!307} +// CHECK:STDOUT: !314 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef077c075a7e2432:ImplicitAs.ad22d1bbc0605210.Core.ba7abeb9eee545e2", scope: null, file: !200, line: 43, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !323) +// CHECK:STDOUT: !315 = !DILocalVariable(arg: 1, scope: !314, type: !6) +// CHECK:STDOUT: !319 = !DILocation(line: 43, column: 40, scope: !314) +// CHECK:STDOUT: !320 = !{!6, !6} +// CHECK:STDOUT: !321 = !DISubroutineType(types: !320) +// CHECK:STDOUT: !322 = !DILocation(line: 43, column: 33, scope: !314) +// CHECK:STDOUT: !323 = !{!315} +// CHECK:STDOUT: !324 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.00b00ea46fa3b046", scope: null, file: !16, line: 33, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !331) +// CHECK:STDOUT: !325 = !DILocalVariable(arg: 1, scope: !324, type: !6) +// CHECK:STDOUT: !329 = !DILocation(line: 34, column: 12, scope: !324) +// CHECK:STDOUT: !330 = !DILocation(line: 34, column: 5, scope: !324) +// CHECK:STDOUT: !331 = !{!325} +// CHECK:STDOUT: !332 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.d4057e3ae48c02cc", scope: null, file: !16, line: 131, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !345) +// CHECK:STDOUT: !333 = !DILocalVariable(arg: 1, scope: !332, type: !6) +// CHECK:STDOUT: !341 = !DILocation(line: 137, column: 5, scope: !332) +// CHECK:STDOUT: !343 = !DILocation(line: 138, column: 5, scope: !332) +// CHECK:STDOUT: !344 = !DILocation(line: 139, column: 5, scope: !332) +// CHECK:STDOUT: !345 = !{!333} +// CHECK:STDOUT: !346 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !347 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.45e1f8de18643ddf:ImplicitAs.0bc6489996802dd4.Core.bb469f8924cce044", scope: null, file: !346, line: 64, type: !321, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !355) +// CHECK:STDOUT: !348 = !DILocalVariable(arg: 1, scope: !347, type: !6) +// CHECK:STDOUT: !352 = !DILocation(line: 66, column: 17, scope: !347) +// CHECK:STDOUT: !354 = !DILocation(line: 66, column: 5, scope: !347) +// CHECK:STDOUT: !355 = !{!348} +// CHECK:STDOUT: !356 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.cd77d7fbcb14a7c2", scope: null, file: !16, line: 131, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !369) +// CHECK:STDOUT: !357 = !DILocalVariable(arg: 1, scope: !356, type: !6) +// CHECK:STDOUT: !365 = !DILocation(line: 137, column: 5, scope: !356) +// CHECK:STDOUT: !366 = !DILocation(line: 137, column: 28, scope: !356) +// CHECK:STDOUT: !367 = !DILocation(line: 138, column: 5, scope: !356) +// CHECK:STDOUT: !368 = !DILocation(line: 139, column: 5, scope: !356) +// CHECK:STDOUT: !369 = !{!357} +// CHECK:STDOUT: !370 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !346, line: 59, type: !321, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !377) +// CHECK:STDOUT: !371 = !DILocalVariable(arg: 1, scope: !370, type: !6) +// CHECK:STDOUT: !376 = !DILocation(line: 59, column: 28, scope: !370) +// CHECK:STDOUT: !377 = !{!371} +// CHECK:STDOUT: !378 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") +// CHECK:STDOUT: !379 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.4d6ceefeb7f772f4", scope: null, file: !378, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !387) +// CHECK:STDOUT: !380 = !DILocalVariable(arg: 1, scope: !379, type: !6) +// CHECK:STDOUT: !386 = !DILocation(line: 23, column: 25, scope: !379) +// CHECK:STDOUT: !387 = !{!380} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'copy.carbon' @@ -786,79 +731,72 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: declare void @"_COp.Copyable.Main:Copy.Core"(ptr sret({}), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !410 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !390 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !412 +// CHECK:STDOUT: ret void, !dbg !392 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb3dd30fa3a4aa62:core.Destroy.Core"(ptr %self) #0 !dbg !414 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core"(ptr %self) #0 !dbg !394 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !416 +// CHECK:STDOUT: ret void, !dbg !396 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core"(ptr %self) #0 !dbg !418 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ {}, i1 }) %return, ptr %c) #0 !dbg !398 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb3dd30fa3a4aa62:core.Destroy.Core"(ptr %self), !dbg !420 -// CHECK:STDOUT: ret void, !dbg !420 +// CHECK:STDOUT: call void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31"(ptr %return, ptr %c), !dbg !403 +// CHECK:STDOUT: ret void, !dbg !404 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ {}, i1 }) %return, ptr %c) #0 !dbg !422 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31"(ptr %return, ptr %c), !dbg !427 -// CHECK:STDOUT: ret void, !dbg !428 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !406 { +// CHECK:STDOUT: call void @"_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %self), !dbg !412 +// CHECK:STDOUT: ret void, !dbg !413 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !430 { -// CHECK:STDOUT: call void @"_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %self), !dbg !436 -// CHECK:STDOUT: ret void, !dbg !437 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return, ptr %value) #0 !dbg !439 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value), !dbg !445 -// CHECK:STDOUT: br i1 %1, label %2, label %3, !dbg !446 +// CHECK:STDOUT: define linkonce_odr void @"_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return, ptr %value) #0 !dbg !415 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value), !dbg !421 +// CHECK:STDOUT: br i1 %1, label %2, label %3, !dbg !422 // CHECK:STDOUT: // CHECK:STDOUT: 2: ; preds = %0 -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 0, !dbg !447 -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %value1), !dbg !448 -// CHECK:STDOUT: ret void, !dbg !449 +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 0, !dbg !423 +// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %value1), !dbg !424 +// CHECK:STDOUT: ret void, !dbg !425 // CHECK:STDOUT: // CHECK:STDOUT: 3: ; preds = %0 -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return), !dbg !450 -// CHECK:STDOUT: ret void, !dbg !451 +// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return), !dbg !426 +// CHECK:STDOUT: ret void, !dbg !427 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value) #0 !dbg !453 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 1, !dbg !458 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !458 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !458 -// CHECK:STDOUT: ret i1 %2, !dbg !459 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value) #0 !dbg !429 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 1, !dbg !434 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !434 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !434 +// CHECK:STDOUT: ret i1 %2, !dbg !435 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !461 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 0, !dbg !470 -// CHECK:STDOUT: call void @"_COp.Copyable.Main:Copy.Core"(ptr %value, ptr %self), !dbg !471 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !472 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !472 -// CHECK:STDOUT: ret void, !dbg !473 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !437 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 0, !dbg !446 +// CHECK:STDOUT: call void @"_COp.Copyable.Main:Copy.Core"(ptr %value, ptr %self), !dbg !447 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !448 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !448 +// CHECK:STDOUT: ret void, !dbg !449 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return) #0 !dbg !475 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !482 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !482 -// CHECK:STDOUT: ret void, !dbg !483 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr sret({ {}, i1 }) %return) #0 !dbg !451 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !458 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !458 +// CHECK:STDOUT: ret void, !dbg !459 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!409} +// CHECK:STDOUT: !llvm.dbg.cu = !{!389} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -869,83 +807,79 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !12 = !{!7, !7} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) // CHECK:STDOUT: !16 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !46 = !{!7} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !408 = !DIFile(filename: "copy.carbon", directory: "") -// CHECK:STDOUT: !409 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !408, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !410 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !408, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !413) -// CHECK:STDOUT: !411 = !DILocalVariable(arg: 1, scope: !410, type: !7) -// CHECK:STDOUT: !412 = !DILocation(line: 9, column: 9, scope: !410) -// CHECK:STDOUT: !413 = !{!411} -// CHECK:STDOUT: !414 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb3dd30fa3a4aa62:core.Destroy.Core", scope: null, file: !408, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !417) -// CHECK:STDOUT: !415 = !DILocalVariable(arg: 1, scope: !414, type: !7) -// CHECK:STDOUT: !416 = !DILocation(line: 9, column: 9, scope: !414) -// CHECK:STDOUT: !417 = !{!415} -// CHECK:STDOUT: !418 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core", scope: null, file: !408, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !421) -// CHECK:STDOUT: !419 = !DILocalVariable(arg: 1, scope: !418, type: !7) -// CHECK:STDOUT: !420 = !DILocation(line: 9, column: 9, scope: !418) -// CHECK:STDOUT: !421 = !{!419} -// CHECK:STDOUT: !422 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !408, line: 9, type: !13, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !429) -// CHECK:STDOUT: !423 = !DILocalVariable(arg: 1, scope: !422, type: !7) -// CHECK:STDOUT: !427 = !DILocation(line: 11, column: 10, scope: !422) -// CHECK:STDOUT: !428 = !DILocation(line: 11, column: 3, scope: !422) -// CHECK:STDOUT: !429 = !{!423} -// CHECK:STDOUT: !430 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !438) -// CHECK:STDOUT: !431 = !DILocalVariable(arg: 1, scope: !430, type: !7) -// CHECK:STDOUT: !436 = !DILocation(line: 51, column: 12, scope: !430) -// CHECK:STDOUT: !437 = !DILocation(line: 51, column: 5, scope: !430) -// CHECK:STDOUT: !438 = !{!431} -// CHECK:STDOUT: !439 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 147, type: !13, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !452) -// CHECK:STDOUT: !440 = !DILocalVariable(arg: 1, scope: !439, type: !7) -// CHECK:STDOUT: !445 = !DILocation(line: 148, column: 9, scope: !439) -// CHECK:STDOUT: !446 = !DILocation(line: 148, column: 8, scope: !439) -// CHECK:STDOUT: !447 = !DILocation(line: 149, column: 15, scope: !439) -// CHECK:STDOUT: !448 = !DILocation(line: 149, column: 14, scope: !439) -// CHECK:STDOUT: !449 = !DILocation(line: 149, column: 7, scope: !439) -// CHECK:STDOUT: !450 = !DILocation(line: 151, column: 14, scope: !439) -// CHECK:STDOUT: !451 = !DILocation(line: 151, column: 7, scope: !439) -// CHECK:STDOUT: !452 = !{!440} -// CHECK:STDOUT: !453 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 141, type: !13, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !460) -// CHECK:STDOUT: !454 = !DILocalVariable(arg: 1, scope: !453, type: !7) -// CHECK:STDOUT: !458 = !DILocation(line: 142, column: 12, scope: !453) -// CHECK:STDOUT: !459 = !DILocation(line: 142, column: 5, scope: !453) -// CHECK:STDOUT: !460 = !{!454} -// CHECK:STDOUT: !461 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !409, retainedNodes: !474) -// CHECK:STDOUT: !462 = !DILocalVariable(arg: 1, scope: !461, type: !7) -// CHECK:STDOUT: !470 = !DILocation(line: 137, column: 5, scope: !461) -// CHECK:STDOUT: !471 = !DILocation(line: 137, column: 28, scope: !461) -// CHECK:STDOUT: !472 = !DILocation(line: 138, column: 5, scope: !461) -// CHECK:STDOUT: !473 = !DILocation(line: 139, column: 5, scope: !461) -// CHECK:STDOUT: !474 = !{!462} -// CHECK:STDOUT: !475 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 125, type: !47, spFlags: DISPFlagDefinition, unit: !409) -// CHECK:STDOUT: !482 = !DILocation(line: 128, column: 5, scope: !475) -// CHECK:STDOUT: !483 = !DILocation(line: 129, column: 5, scope: !475) +// CHECK:STDOUT: !42 = !{!7} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !388 = !DIFile(filename: "copy.carbon", directory: "") +// CHECK:STDOUT: !389 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !388, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !388, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !393) +// CHECK:STDOUT: !391 = !DILocalVariable(arg: 1, scope: !390, type: !7) +// CHECK:STDOUT: !392 = !DILocation(line: 9, column: 9, scope: !390) +// CHECK:STDOUT: !393 = !{!391} +// CHECK:STDOUT: !394 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core", scope: null, file: !388, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !397) +// CHECK:STDOUT: !395 = !DILocalVariable(arg: 1, scope: !394, type: !7) +// CHECK:STDOUT: !396 = !DILocation(line: 9, column: 9, scope: !394) +// CHECK:STDOUT: !397 = !{!395} +// CHECK:STDOUT: !398 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !388, line: 9, type: !13, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !405) +// CHECK:STDOUT: !399 = !DILocalVariable(arg: 1, scope: !398, type: !7) +// CHECK:STDOUT: !403 = !DILocation(line: 11, column: 10, scope: !398) +// CHECK:STDOUT: !404 = !DILocation(line: 11, column: 3, scope: !398) +// CHECK:STDOUT: !405 = !{!399} +// CHECK:STDOUT: !406 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.a2b7303f9ef09f31", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !414) +// CHECK:STDOUT: !407 = !DILocalVariable(arg: 1, scope: !406, type: !7) +// CHECK:STDOUT: !412 = !DILocation(line: 51, column: 12, scope: !406) +// CHECK:STDOUT: !413 = !DILocation(line: 51, column: 5, scope: !406) +// CHECK:STDOUT: !414 = !{!407} +// CHECK:STDOUT: !415 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 147, type: !13, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !428) +// CHECK:STDOUT: !416 = !DILocalVariable(arg: 1, scope: !415, type: !7) +// CHECK:STDOUT: !421 = !DILocation(line: 148, column: 9, scope: !415) +// CHECK:STDOUT: !422 = !DILocation(line: 148, column: 8, scope: !415) +// CHECK:STDOUT: !423 = !DILocation(line: 149, column: 15, scope: !415) +// CHECK:STDOUT: !424 = !DILocation(line: 149, column: 14, scope: !415) +// CHECK:STDOUT: !425 = !DILocation(line: 149, column: 7, scope: !415) +// CHECK:STDOUT: !426 = !DILocation(line: 151, column: 14, scope: !415) +// CHECK:STDOUT: !427 = !DILocation(line: 151, column: 7, scope: !415) +// CHECK:STDOUT: !428 = !{!416} +// CHECK:STDOUT: !429 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 141, type: !13, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !436) +// CHECK:STDOUT: !430 = !DILocalVariable(arg: 1, scope: !429, type: !7) +// CHECK:STDOUT: !434 = !DILocation(line: 142, column: 12, scope: !429) +// CHECK:STDOUT: !435 = !DILocation(line: 142, column: 5, scope: !429) +// CHECK:STDOUT: !436 = !{!430} +// CHECK:STDOUT: !437 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !389, retainedNodes: !450) +// CHECK:STDOUT: !438 = !DILocalVariable(arg: 1, scope: !437, type: !7) +// CHECK:STDOUT: !446 = !DILocation(line: 137, column: 5, scope: !437) +// CHECK:STDOUT: !447 = !DILocation(line: 137, column: 28, scope: !437) +// CHECK:STDOUT: !448 = !DILocation(line: 138, column: 5, scope: !437) +// CHECK:STDOUT: !449 = !DILocation(line: 139, column: 5, scope: !437) +// CHECK:STDOUT: !450 = !{!438} +// CHECK:STDOUT: !451 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 125, type: !43, spFlags: DISPFlagDefinition, unit: !389) +// CHECK:STDOUT: !458 = !DILocation(line: 128, column: 5, scope: !451) +// CHECK:STDOUT: !459 = !DILocation(line: 129, column: 5, scope: !451) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'copy_pointer.carbon' // CHECK:STDOUT: source_filename = "copy_pointer.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !486 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !462 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !488 +// CHECK:STDOUT: ret void, !dbg !464 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !490 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !466 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Optional.as.Copy.impl.Op.call = call ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608"(ptr %c), !dbg !495 -// CHECK:STDOUT: ret ptr %Optional.as.Copy.impl.Op.call, !dbg !496 +// CHECK:STDOUT: %Optional.as.Copy.impl.Op.call = call ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608"(ptr %c), !dbg !471 +// CHECK:STDOUT: ret ptr %Optional.as.Copy.impl.Op.call, !dbg !472 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608"(ptr %self) #0 !dbg !498 { -// CHECK:STDOUT: ret ptr %self, !dbg !505 +// CHECK:STDOUT: define linkonce_odr ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608"(ptr %self) #0 !dbg !474 { +// CHECK:STDOUT: ret ptr %self, !dbg !481 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!485} +// CHECK:STDOUT: !llvm.dbg.cu = !{!461} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -956,19 +890,19 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !12 = !{!7, !7} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) // CHECK:STDOUT: !16 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !484 = !DIFile(filename: "copy_pointer.carbon", directory: "") -// CHECK:STDOUT: !485 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !484, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !486 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !16, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !485, retainedNodes: !489) -// CHECK:STDOUT: !487 = !DILocalVariable(arg: 1, scope: !486, type: !7) -// CHECK:STDOUT: !488 = !DILocation(line: 164, column: 19, scope: !486) -// CHECK:STDOUT: !489 = !{!487} -// CHECK:STDOUT: !490 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !484, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !485, retainedNodes: !497) -// CHECK:STDOUT: !491 = !DILocalVariable(arg: 1, scope: !490, type: !7) -// CHECK:STDOUT: !495 = !DILocation(line: 6, column: 10, scope: !490) -// CHECK:STDOUT: !496 = !DILocation(line: 6, column: 3, scope: !490) -// CHECK:STDOUT: !497 = !{!491} -// CHECK:STDOUT: !498 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !485, retainedNodes: !506) -// CHECK:STDOUT: !499 = !DILocalVariable(arg: 1, scope: !498, type: !7) -// CHECK:STDOUT: !505 = !DILocation(line: 51, column: 5, scope: !498) -// CHECK:STDOUT: !506 = !{!499} +// CHECK:STDOUT: !460 = !DIFile(filename: "copy_pointer.carbon", directory: "") +// CHECK:STDOUT: !461 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !460, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !462 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !16, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !461, retainedNodes: !465) +// CHECK:STDOUT: !463 = !DILocalVariable(arg: 1, scope: !462, type: !7) +// CHECK:STDOUT: !464 = !DILocation(line: 164, column: 19, scope: !462) +// CHECK:STDOUT: !465 = !{!463} +// CHECK:STDOUT: !466 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !460, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !461, retainedNodes: !473) +// CHECK:STDOUT: !467 = !DILocalVariable(arg: 1, scope: !466, type: !7) +// CHECK:STDOUT: !471 = !DILocation(line: 6, column: 10, scope: !466) +// CHECK:STDOUT: !472 = !DILocation(line: 6, column: 3, scope: !466) +// CHECK:STDOUT: !473 = !{!467} +// CHECK:STDOUT: !474 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.3e2e92aa38469608", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !461, retainedNodes: !482) +// CHECK:STDOUT: !475 = !DILocalVariable(arg: 1, scope: !474, type: !7) +// CHECK:STDOUT: !481 = !DILocation(line: 51, column: 5, scope: !474) +// CHECK:STDOUT: !482 = !{!475} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/return_var_byval.carbon b/toolchain/lower/testdata/return/return_var_byval.carbon index 155734d33ad5..cee4488fbc3c 100644 --- a/toolchain/lower/testdata/return/return_var_byval.carbon +++ b/toolchain/lower/testdata/return/return_var_byval.carbon @@ -37,18 +37,11 @@ fn Main() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -75,12 +68,8 @@ fn Main() -> i32 { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !20) // CHECK:STDOUT: !34 = !DILocation(line: 14, column: 12, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 14, column: 12, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !42 = !DILocation(line: 14, column: 12, scope: !40) -// CHECK:STDOUT: !43 = !{!41} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/var.carbon b/toolchain/lower/testdata/return/var.carbon index 252290abbbd3..fb07268d62be 100644 --- a/toolchain/lower/testdata/return/var.carbon +++ b/toolchain/lower/testdata/return/var.carbon @@ -37,18 +37,11 @@ fn Main() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -75,12 +68,8 @@ fn Main() -> i32 { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !20) // CHECK:STDOUT: !34 = !DILocation(line: 14, column: 3, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 14, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !42 = !DILocation(line: 14, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/layout.carbon b/toolchain/lower/testdata/struct/layout.carbon index 12242868ddbf..d70c4e69f2b6 100644 --- a/toolchain/lower/testdata/struct/layout.carbon +++ b/toolchain/lower/testdata/struct/layout.carbon @@ -101,31 +101,24 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -160,22 +153,18 @@ fn F() { // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 7, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) // CHECK:STDOUT: !47 = !DILocation(line: 7, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) // CHECK:STDOUT: !51 = !DILocation(line: 7, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 7, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) -// CHECK:STDOUT: !59 = !DILocation(line: 7, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'avoid_tail_padding.carbon' @@ -184,61 +173,54 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !63 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %avoid_tail_padding.var = alloca <{ ptr, i32 }>, align 8, !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %avoid_tail_padding.var), !dbg !64 -// CHECK:STDOUT: %.loc8.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %avoid_tail_padding.var, i32 0, i32 1, !dbg !66 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.y), !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %avoid_tail_padding.var), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: %avoid_tail_padding.var = alloca <{ ptr, i32 }>, align 8, !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %avoid_tail_padding.var), !dbg !60 +// CHECK:STDOUT: %.loc8.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %avoid_tail_padding.var, i32 0, i32 1, !dbg !62 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.y), !dbg !64 +// CHECK:STDOUT: call void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %avoid_tail_padding.var), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !78 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !82 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !84 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !84 // CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !86 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !88 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !90 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!62} +// CHECK:STDOUT: !llvm.dbg.cu = !{!58} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -251,37 +233,33 @@ fn F() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !20} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !61 = !DIFile(filename: "avoid_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !62 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !61, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !61, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !62) -// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !DILocation(line: 8, column: 6, scope: !63) -// CHECK:STDOUT: !68 = !DILocation(line: 8, column: 3, scope: !63) -// CHECK:STDOUT: !69 = !DILocation(line: 5, column: 1, scope: !63) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !61, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !73) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !21) +// CHECK:STDOUT: !57 = !DIFile(filename: "avoid_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !58 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !57, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !57, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !60 = !DILocation(line: 7, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !DILocation(line: 8, column: 6, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 8, column: 3, scope: !59) +// CHECK:STDOUT: !65 = !DILocation(line: 5, column: 1, scope: !59) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !57, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !21) +// CHECK:STDOUT: !68 = !DILocation(line: 7, column: 3, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !57, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !73) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !20) // CHECK:STDOUT: !72 = !DILocation(line: 7, column: 3, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !61, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !77) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !57, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !20) // CHECK:STDOUT: !76 = !DILocation(line: 7, column: 3, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !61, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !20) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !57, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !21) // CHECK:STDOUT: !80 = !DILocation(line: 7, column: 3, scope: !78) // CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !61, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !20) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !57, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !85) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !21) // CHECK:STDOUT: !84 = !DILocation(line: 7, column: 3, scope: !82) // CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !61, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !21) -// CHECK:STDOUT: !88 = !DILocation(line: 7, column: 3, scope: !86) -// CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !61, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !21) -// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 3, scope: !90) -// CHECK:STDOUT: !93 = !{!91} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_tail_padding.carbon' @@ -290,77 +268,70 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !96 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %use_tail_padding.var = alloca { <{ ptr, i32 }>, i32 }, align 8, !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %use_tail_padding.var), !dbg !97 -// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 0, !dbg !99 -// CHECK:STDOUT: %.loc9_24.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 1, !dbg !99 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.y), !dbg !101 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 1, !dbg !102 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !104 -// CHECK:STDOUT: call void @"_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core"(ptr %use_tail_padding.var), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: %use_tail_padding.var = alloca { <{ ptr, i32 }>, i32 }, align 8, !dbg !89 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %use_tail_padding.var), !dbg !89 +// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 0, !dbg !91 +// CHECK:STDOUT: %.loc9_24.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 1, !dbg !91 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.y), !dbg !93 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 1, !dbg !94 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !96 +// CHECK:STDOUT: call void @"_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core"(ptr %use_tail_padding.var), !dbg !89 +// CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !98 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !102 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !106 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !110 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !114 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !114 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !116 // CHECK:STDOUT: ret void, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !118 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self) #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !120 // CHECK:STDOUT: ret void, !dbg !120 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !122 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self) #0 !dbg !122 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self), !dbg !124 // CHECK:STDOUT: ret void, !dbg !124 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !126 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !128 -// CHECK:STDOUT: ret void, !dbg !128 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self) #0 !dbg !130 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !132 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self) #0 !dbg !134 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core"(ptr %self), !dbg !136 -// CHECK:STDOUT: ret void, !dbg !136 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!95} +// CHECK:STDOUT: !llvm.dbg.cu = !{!87} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -373,47 +344,43 @@ fn F() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !20} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !94 = !DIFile(filename: "use_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !95 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !94, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !94, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !95) -// CHECK:STDOUT: !97 = !DILocation(line: 8, column: 3, scope: !96) -// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 6, scope: !96) -// CHECK:STDOUT: !101 = !DILocation(line: 9, column: 3, scope: !96) -// CHECK:STDOUT: !102 = !DILocation(line: 10, column: 6, scope: !96) -// CHECK:STDOUT: !104 = !DILocation(line: 10, column: 3, scope: !96) -// CHECK:STDOUT: !105 = !DILocation(line: 5, column: 1, scope: !96) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !94, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !109) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !21) +// CHECK:STDOUT: !86 = !DIFile(filename: "use_tail_padding.carbon", directory: "") +// CHECK:STDOUT: !87 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !86, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !86, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !87) +// CHECK:STDOUT: !89 = !DILocation(line: 8, column: 3, scope: !88) +// CHECK:STDOUT: !91 = !DILocation(line: 9, column: 6, scope: !88) +// CHECK:STDOUT: !93 = !DILocation(line: 9, column: 3, scope: !88) +// CHECK:STDOUT: !94 = !DILocation(line: 10, column: 6, scope: !88) +// CHECK:STDOUT: !96 = !DILocation(line: 10, column: 3, scope: !88) +// CHECK:STDOUT: !97 = !DILocation(line: 5, column: 1, scope: !88) +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !86, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !101) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !21) +// CHECK:STDOUT: !100 = !DILocation(line: 8, column: 3, scope: !98) +// CHECK:STDOUT: !101 = !{!99} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !86, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !105) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !20) +// CHECK:STDOUT: !104 = !DILocation(line: 8, column: 3, scope: !102) +// CHECK:STDOUT: !105 = !{!103} +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !86, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !109) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !20) // CHECK:STDOUT: !108 = !DILocation(line: 8, column: 3, scope: !106) // CHECK:STDOUT: !109 = !{!107} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !94, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !113) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !20) +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !86, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !113) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !21) // CHECK:STDOUT: !112 = !DILocation(line: 8, column: 3, scope: !110) // CHECK:STDOUT: !113 = !{!111} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !94, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !117) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !20) +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !86, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !117) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !21) // CHECK:STDOUT: !116 = !DILocation(line: 8, column: 3, scope: !114) // CHECK:STDOUT: !117 = !{!115} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !94, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !121) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !20) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core", scope: null, file: !86, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !121) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !21) // CHECK:STDOUT: !120 = !DILocation(line: 8, column: 3, scope: !118) // CHECK:STDOUT: !121 = !{!119} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !94, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !125) +// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core", scope: null, file: !86, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !125) // CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !21) // CHECK:STDOUT: !124 = !DILocation(line: 8, column: 3, scope: !122) // CHECK:STDOUT: !125 = !{!123} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !94, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !129) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !21) -// CHECK:STDOUT: !128 = !DILocation(line: 8, column: 3, scope: !126) -// CHECK:STDOUT: !129 = !{!127} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3862e4ac11efcf1c:core.Destroy.Core", scope: null, file: !94, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !21) -// CHECK:STDOUT: !132 = !DILocation(line: 8, column: 3, scope: !130) -// CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3862e4ac11efcf1c:core.Destroy.Core", scope: null, file: !94, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !137) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !21) -// CHECK:STDOUT: !136 = !DILocation(line: 8, column: 3, scope: !134) -// CHECK:STDOUT: !137 = !{!135} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'implicit_padding.carbon' @@ -422,77 +389,70 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !140 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %implicit_padding.var = alloca { <{ ptr, i32 }>, ptr }, align 8, !dbg !141 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %implicit_padding.var), !dbg !141 -// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 0, !dbg !143 -// CHECK:STDOUT: %.loc9_24.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 0, !dbg !143 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.x), !dbg !145 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 1, !dbg !146 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !148 -// CHECK:STDOUT: call void @"_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %implicit_padding.var), !dbg !141 -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: %implicit_padding.var = alloca { <{ ptr, i32 }>, ptr }, align 8, !dbg !129 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %implicit_padding.var), !dbg !129 +// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 0, !dbg !131 +// CHECK:STDOUT: %.loc9_24.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 0, !dbg !131 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.x), !dbg !133 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 1, !dbg !134 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !136 +// CHECK:STDOUT: call void @"_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %implicit_padding.var), !dbg !129 +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !150 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !138 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !140 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !142 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !144 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !146 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !148 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !150 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !154 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !154 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !156 // CHECK:STDOUT: ret void, !dbg !156 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !158 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self) #0 !dbg !158 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !160 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !162 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self) #0 !dbg !162 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !164 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self), !dbg !164 // CHECK:STDOUT: ret void, !dbg !164 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !166 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !168 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.90798694d9a177e6:core.Destroy.Core"(ptr %self) #0 !dbg !170 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core"(ptr %self), !dbg !172 -// CHECK:STDOUT: ret void, !dbg !172 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self) #0 !dbg !174 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !176 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self) #0 !dbg !178 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core"(ptr %self), !dbg !180 -// CHECK:STDOUT: ret void, !dbg !180 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!139} +// CHECK:STDOUT: !llvm.dbg.cu = !{!127} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -505,47 +465,43 @@ fn F() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !20} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !138 = !DIFile(filename: "implicit_padding.carbon", directory: "") -// CHECK:STDOUT: !139 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !138, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !138, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !139) -// CHECK:STDOUT: !141 = !DILocation(line: 8, column: 3, scope: !140) -// CHECK:STDOUT: !143 = !DILocation(line: 9, column: 6, scope: !140) -// CHECK:STDOUT: !145 = !DILocation(line: 9, column: 3, scope: !140) -// CHECK:STDOUT: !146 = !DILocation(line: 10, column: 6, scope: !140) -// CHECK:STDOUT: !148 = !DILocation(line: 10, column: 3, scope: !140) -// CHECK:STDOUT: !149 = !DILocation(line: 5, column: 1, scope: !140) -// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !138, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !153) +// CHECK:STDOUT: !126 = !DIFile(filename: "implicit_padding.carbon", directory: "") +// CHECK:STDOUT: !127 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !126, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !126, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !127) +// CHECK:STDOUT: !129 = !DILocation(line: 8, column: 3, scope: !128) +// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 6, scope: !128) +// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 3, scope: !128) +// CHECK:STDOUT: !134 = !DILocation(line: 10, column: 6, scope: !128) +// CHECK:STDOUT: !136 = !DILocation(line: 10, column: 3, scope: !128) +// CHECK:STDOUT: !137 = !DILocation(line: 5, column: 1, scope: !128) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !126, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !141) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !21) +// CHECK:STDOUT: !140 = !DILocation(line: 8, column: 3, scope: !138) +// CHECK:STDOUT: !141 = !{!139} +// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !126, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !145) +// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !20) +// CHECK:STDOUT: !144 = !DILocation(line: 8, column: 3, scope: !142) +// CHECK:STDOUT: !145 = !{!143} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !126, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !149) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !20) +// CHECK:STDOUT: !148 = !DILocation(line: 8, column: 3, scope: !146) +// CHECK:STDOUT: !149 = !{!147} +// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !126, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !153) // CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !21) // CHECK:STDOUT: !152 = !DILocation(line: 8, column: 3, scope: !150) // CHECK:STDOUT: !153 = !{!151} -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !138, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !157) -// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !20) +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !126, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !157) +// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !21) // CHECK:STDOUT: !156 = !DILocation(line: 8, column: 3, scope: !154) // CHECK:STDOUT: !157 = !{!155} -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !138, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !161) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !20) +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core", scope: null, file: !126, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !161) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !21) // CHECK:STDOUT: !160 = !DILocation(line: 8, column: 3, scope: !158) // CHECK:STDOUT: !161 = !{!159} -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !138, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !165) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !20) +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core", scope: null, file: !126, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !127, retainedNodes: !165) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !21) // CHECK:STDOUT: !164 = !DILocation(line: 8, column: 3, scope: !162) // CHECK:STDOUT: !165 = !{!163} -// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.90798694d9a177e6:core.Destroy.Core", scope: null, file: !138, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !169) -// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !21) -// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 3, scope: !166) -// CHECK:STDOUT: !169 = !{!167} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.90798694d9a177e6:core.Destroy.Core", scope: null, file: !138, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !173) -// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !21) -// CHECK:STDOUT: !172 = !DILocation(line: 8, column: 3, scope: !170) -// CHECK:STDOUT: !173 = !{!171} -// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fb4d9eb13d71ce13:core.Destroy.Core", scope: null, file: !138, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !177) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !21) -// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 3, scope: !174) -// CHECK:STDOUT: !177 = !{!175} -// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fb4d9eb13d71ce13:core.Destroy.Core", scope: null, file: !138, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !139, retainedNodes: !181) -// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !21) -// CHECK:STDOUT: !180 = !DILocation(line: 8, column: 3, scope: !178) -// CHECK:STDOUT: !181 = !{!179} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'insert_padding.carbon' @@ -554,74 +510,67 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !184 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !168 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %insert_padding.var = alloca <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, align 8, !dbg !185 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %insert_padding.var), !dbg !185 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %insert_padding.var, i32 0, i32 1, !dbg !187 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.b496992173693e26:core.Destroy.Core"(ptr %insert_padding.var), !dbg !185 -// CHECK:STDOUT: ret void, !dbg !190 +// CHECK:STDOUT: %insert_padding.var = alloca <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, align 8, !dbg !169 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %insert_padding.var), !dbg !169 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %insert_padding.var, i32 0, i32 1, !dbg !171 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !173 +// CHECK:STDOUT: call void @"_CSelfDestruct.b496992173693e26:core.Destroy.Core"(ptr %insert_padding.var), !dbg !169 +// CHECK:STDOUT: ret void, !dbg !174 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !191 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !175 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !177 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !179 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !185 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self), !dbg !189 +// CHECK:STDOUT: ret void, !dbg !189 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !191 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !193 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !195 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b496992173693e26:core.Destroy.Core"(ptr %self) #0 !dbg !195 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !197 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !199 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b496992173693e26:core.Destroy.Core"(ptr %self) #0 !dbg !199 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !201 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b496992173693e26:core.Destroy.Core"(ptr %self), !dbg !201 // CHECK:STDOUT: ret void, !dbg !201 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !203 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !205 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core"(ptr %self) #0 !dbg !207 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core"(ptr %self), !dbg !209 -// CHECK:STDOUT: ret void, !dbg !209 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !211 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !213 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b496992173693e26:core.Destroy.Core"(ptr %self) #0 !dbg !215 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !217 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b496992173693e26:core.Destroy.Core"(ptr %self) #0 !dbg !219 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b496992173693e26:core.Destroy.Core"(ptr %self), !dbg !221 -// CHECK:STDOUT: ret void, !dbg !221 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!183} +// CHECK:STDOUT: !llvm.dbg.cu = !{!167} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -634,43 +583,39 @@ fn F() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null, !20} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !182 = !DIFile(filename: "insert_padding.carbon", directory: "") -// CHECK:STDOUT: !183 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !182, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !182, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !183) -// CHECK:STDOUT: !185 = !DILocation(line: 9, column: 3, scope: !184) -// CHECK:STDOUT: !187 = !DILocation(line: 10, column: 6, scope: !184) -// CHECK:STDOUT: !189 = !DILocation(line: 10, column: 3, scope: !184) -// CHECK:STDOUT: !190 = !DILocation(line: 5, column: 1, scope: !184) -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !182, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !20) +// CHECK:STDOUT: !166 = !DIFile(filename: "insert_padding.carbon", directory: "") +// CHECK:STDOUT: !167 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !166, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !166, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !167) +// CHECK:STDOUT: !169 = !DILocation(line: 9, column: 3, scope: !168) +// CHECK:STDOUT: !171 = !DILocation(line: 10, column: 6, scope: !168) +// CHECK:STDOUT: !173 = !DILocation(line: 10, column: 3, scope: !168) +// CHECK:STDOUT: !174 = !DILocation(line: 5, column: 1, scope: !168) +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !166, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !178) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !20) +// CHECK:STDOUT: !177 = !DILocation(line: 9, column: 3, scope: !175) +// CHECK:STDOUT: !178 = !{!176} +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !166, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !182) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !20) +// CHECK:STDOUT: !181 = !DILocation(line: 9, column: 3, scope: !179) +// CHECK:STDOUT: !182 = !{!180} +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !166, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !186) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !21) +// CHECK:STDOUT: !185 = !DILocation(line: 9, column: 3, scope: !183) +// CHECK:STDOUT: !186 = !{!184} +// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !166, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !190) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !21) +// CHECK:STDOUT: !189 = !DILocation(line: 9, column: 3, scope: !187) +// CHECK:STDOUT: !190 = !{!188} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !166, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !194) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !21) // CHECK:STDOUT: !193 = !DILocation(line: 9, column: 3, scope: !191) // CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !182, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !20) +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b496992173693e26:core.Destroy.Core", scope: null, file: !166, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !198) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !21) // CHECK:STDOUT: !197 = !DILocation(line: 9, column: 3, scope: !195) // CHECK:STDOUT: !198 = !{!196} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !182, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !202) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !20) +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b496992173693e26:core.Destroy.Core", scope: null, file: !166, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !167, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !21) // CHECK:STDOUT: !201 = !DILocation(line: 9, column: 3, scope: !199) // CHECK:STDOUT: !202 = !{!200} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !182, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !206) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !21) -// CHECK:STDOUT: !205 = !DILocation(line: 9, column: 3, scope: !203) -// CHECK:STDOUT: !206 = !{!204} -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cc12b768126bed5c:core.Destroy.Core", scope: null, file: !182, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !210) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !21) -// CHECK:STDOUT: !209 = !DILocation(line: 9, column: 3, scope: !207) -// CHECK:STDOUT: !210 = !{!208} -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !182, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !214) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !21) -// CHECK:STDOUT: !213 = !DILocation(line: 9, column: 3, scope: !211) -// CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b496992173693e26:core.Destroy.Core", scope: null, file: !182, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !21) -// CHECK:STDOUT: !217 = !DILocation(line: 9, column: 3, scope: !215) -// CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b496992173693e26:core.Destroy.Core", scope: null, file: !182, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !183, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !21) -// CHECK:STDOUT: !221 = !DILocation(line: 9, column: 3, scope: !219) -// CHECK:STDOUT: !222 = !{!220} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index 14d68669ad6e..e12b7bbbd9e2 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -53,50 +53,36 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !65 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !77 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self) #0 !dbg !83 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core"(ptr %self), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !85 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -137,32 +123,24 @@ fn Run() -> i32 { // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !34) // CHECK:STDOUT: !57 = !DILocation(line: 16, column: 3, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !62) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !34) // CHECK:STDOUT: !61 = !DILocation(line: 16, column: 3, scope: !59) // CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !32, line: 16, type: !38, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !34) -// CHECK:STDOUT: !65 = !DILocation(line: 16, column: 3, scope: !63) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !66) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !39) +// CHECK:STDOUT: !65 = !DILocation(line: 14, column: 3, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7945ecba5c505fc0:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !39) // CHECK:STDOUT: !69 = !DILocation(line: 14, column: 3, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) // CHECK:STDOUT: !73 = !DILocation(line: 14, column: 3, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !78) // CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) // CHECK:STDOUT: !77 = !DILocation(line: 14, column: 3, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) -// CHECK:STDOUT: !81 = !DILocation(line: 14, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09c9bb256d6f25f6:core.Destroy.Core", scope: null, file: !32, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) -// CHECK:STDOUT: !85 = !DILocation(line: 14, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon index 5629c46b8413..e54e994900ad 100644 --- a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon @@ -42,44 +42,37 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2a02704bde23204a:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core"(ptr %self), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2a02704bde23204a:core.Destroy.Core"(ptr %self) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core"(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -111,28 +104,24 @@ fn G() { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) // CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) // CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 16, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2a02704bde23204a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2a02704bde23204a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) // CHECK:STDOUT: !59 = !DILocation(line: 16, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2a02704bde23204a:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !21) -// CHECK:STDOUT: !63 = !DILocation(line: 16, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/one_entry.carbon b/toolchain/lower/testdata/struct/one_entry.carbon index 32c8dc33b6f8..b3afdbe6f572 100644 --- a/toolchain/lower/testdata/struct/one_entry.carbon +++ b/toolchain/lower/testdata/struct/one_entry.carbon @@ -44,31 +44,24 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -103,20 +96,16 @@ fn Run() -> i32 { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 15, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !25) // CHECK:STDOUT: !47 = !DILocation(line: 15, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !25) // CHECK:STDOUT: !51 = !DILocation(line: 15, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a9280e8bea6fc5f9:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !25) -// CHECK:STDOUT: !55 = !DILocation(line: 15, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 514c0ad0b095..29a8fc34e810 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -52,31 +52,24 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !48 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !52 // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core"(ptr %self), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -115,20 +108,16 @@ fn Run() -> i32 { // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 15, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 15, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !25) // CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !25) // CHECK:STDOUT: !52 = !DILocation(line: 15, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b4c762864cd9a02b:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !25) -// CHECK:STDOUT: !56 = !DILocation(line: 15, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/convert.carbon b/toolchain/lower/testdata/template/convert.carbon index 3244961820ad..963a77ef241c 100644 --- a/toolchain/lower/testdata/template/convert.carbon +++ b/toolchain/lower/testdata/template/convert.carbon @@ -258,26 +258,19 @@ fn Test2(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !87 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba() #0 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !93 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba() #0 !dbg !95 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !96 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !96 -// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !96 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !92 +// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !92 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -305,56 +298,45 @@ fn Test2(c: C) { // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !20) // CHECK:STDOUT: !85 = !DILocation(line: 5, column: 3, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !74, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !90) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !74, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !20) // CHECK:STDOUT: !89 = !DILocation(line: 5, column: 3, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !74, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !20) -// CHECK:STDOUT: !93 = !DILocation(line: 5, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !74, line: 4, type: !77, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !96 = !DILocation(line: 5, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !DILocation(line: 4, column: 1, scope: !95) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !74, line: 4, type: !77, spFlags: DISPFlagDefinition, unit: !75) +// CHECK:STDOUT: !92 = !DILocation(line: 5, column: 3, scope: !91) +// CHECK:STDOUT: !94 = !DILocation(line: 4, column: 1, scope: !91) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_primitive.carbon' // CHECK:STDOUT: source_filename = "initialize_primitive.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !101 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !105 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 0), !dbg !106 // CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !109 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !111 -// CHECK:STDOUT: ret void, !dbg !111 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !113 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 0), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !115 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84588f41d61dafba(i32 %x) #0 !dbg !116 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !119 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !119 -// CHECK:STDOUT: store i32 %x, ptr %w.var, align 4, !dbg !119 -// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !119 -// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !111 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !111 +// CHECK:STDOUT: store i32 %x, ptr %w.var, align 4, !dbg !111 +// CHECK:STDOUT: call void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %w.var), !dbg !111 +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -363,7 +345,7 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!100} +// CHECK:STDOUT: !llvm.dbg.cu = !{!96} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -373,28 +355,24 @@ fn Test2(c: C) { // CHECK:STDOUT: !77 = !DISubroutineType(types: !76) // CHECK:STDOUT: !78 = !{null, !20} // CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !99 = !DIFile(filename: "initialize_primitive.carbon", directory: "") -// CHECK:STDOUT: !100 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !99, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !99, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !100, retainedNodes: !104) +// CHECK:STDOUT: !95 = !DIFile(filename: "initialize_primitive.carbon", directory: "") +// CHECK:STDOUT: !96 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !95, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !95, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !20) +// CHECK:STDOUT: !99 = !DILocation(line: 5, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !95, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !104) // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !20) // CHECK:STDOUT: !103 = !DILocation(line: 5, column: 3, scope: !101) // CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !99, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !100, retainedNodes: !108) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !20) -// CHECK:STDOUT: !107 = !DILocation(line: 5, column: 3, scope: !105) -// CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !99, line: 5, type: !79, spFlags: DISPFlagDefinition, unit: !100, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !20) -// CHECK:STDOUT: !111 = !DILocation(line: 5, column: 3, scope: !109) -// CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !99, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !100) -// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 3, scope: !113) -// CHECK:STDOUT: !115 = !DILocation(line: 8, column: 1, scope: !113) -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !99, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !100, retainedNodes: !123) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !20) -// CHECK:STDOUT: !119 = !DILocation(line: 5, column: 3, scope: !116) -// CHECK:STDOUT: !122 = !DILocation(line: 4, column: 1, scope: !116) -// CHECK:STDOUT: !123 = !{!117} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !95, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !96) +// CHECK:STDOUT: !106 = !DILocation(line: 9, column: 3, scope: !105) +// CHECK:STDOUT: !107 = !DILocation(line: 8, column: 1, scope: !105) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84588f41d61dafba", scope: null, file: !95, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !115) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !20) +// CHECK:STDOUT: !111 = !DILocation(line: 5, column: 3, scope: !108) +// CHECK:STDOUT: !114 = !DILocation(line: 4, column: 1, scope: !108) +// CHECK:STDOUT: !115 = !{!109} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_tuple.carbon' @@ -405,139 +383,125 @@ fn Test2(c: C) { // CHECK:STDOUT: declare void @_CMake.Main(ptr sret({})) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !132 { +// CHECK:STDOUT: define void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !124 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @Y.val.loc14_54, i64 0, i1 false), !dbg !137 -// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @Y.val.loc14_54, i64 0, i1 false), !dbg !129 +// CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !139 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !131 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !140 -// CHECK:STDOUT: call void @_CF.Main.cd5dea75f888aed4(), !dbg !141 -// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !142 -// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !132 +// CHECK:STDOUT: call void @_CF.Main.cd5dea75f888aed4(), !dbg !133 +// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !134 +// CHECK:STDOUT: ret void, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !144 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !136 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !140 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !142 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !148 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self), !dbg !150 // CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !152 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !154 // CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !156 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !156 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self), !dbg !158 // CHECK:STDOUT: ret void, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !160 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self), !dbg !162 // CHECK:STDOUT: ret void, !dbg !162 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !164 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !166 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self) #0 !dbg !168 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %self), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !170 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !172 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !174 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !176 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core"(ptr %self), !dbg !178 -// CHECK:STDOUT: ret void, !dbg !178 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fb3d597a6b1c4ee1() #0 !dbg !180 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fb3d597a6b1c4ee1() #0 !dbg !164 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !181 +// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !165 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !165 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !166 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !167 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !166 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !168 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !166 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !169 +// CHECK:STDOUT: call void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %w.var), !dbg !165 +// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cd5dea75f888aed4() #0 !dbg !172 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !173 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !173 +// CHECK:STDOUT: %.f75.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.f75.array.index), !dbg !175 +// CHECK:STDOUT: %.efc.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.efc.array.index), !dbg !176 +// CHECK:STDOUT: %.d3b.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !174 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.d3b.array.index), !dbg !177 +// CHECK:STDOUT: call void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %w.var), !dbg !173 +// CHECK:STDOUT: ret void, !dbg !179 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !180 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !181 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !181 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !181 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !181 +// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !185 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !181 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !183 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !184 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !185 -// CHECK:STDOUT: call void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %w.var), !dbg !181 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !181 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !182 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !181 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !183 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !181 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !184 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !185 +// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !185 +// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !185 +// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !185 +// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !185 +// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !185 +// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !185 +// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !181 +// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %w.var), !dbg !181 // CHECK:STDOUT: ret void, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.cd5dea75f888aed4() #0 !dbg !188 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !189 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !189 -// CHECK:STDOUT: %.f75.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !190 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.f75.array.index), !dbg !191 -// CHECK:STDOUT: %.efc.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !190 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.efc.array.index), !dbg !192 -// CHECK:STDOUT: %.d3b.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !190 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.d3b.array.index), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core"(ptr %w.var), !dbg !189 -// CHECK:STDOUT: ret void, !dbg !195 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !196 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !197 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !197 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !197 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !197 -// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !201 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !197 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !197 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !198 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !197 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !199 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !197 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !200 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !201 -// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !201 -// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !201 -// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !201 -// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !201 -// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !201 -// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !201 -// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %w.var), !dbg !197 -// CHECK:STDOUT: ret void, !dbg !203 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -547,7 +511,7 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!125} +// CHECK:STDOUT: !llvm.dbg.cu = !{!117} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -555,78 +519,70 @@ fn Test2(c: C) { // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !76 = !{null} // CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !124 = !DIFile(filename: "initialize_from_tuple.carbon", directory: "") -// CHECK:STDOUT: !125 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !124, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !128 = !{!23, !23} -// CHECK:STDOUT: !129 = !DISubroutineType(types: !128) -// CHECK:STDOUT: !130 = !{null, !23} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core", scope: null, file: !124, line: 14, type: !129, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !138) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !23) -// CHECK:STDOUT: !137 = !DILocation(line: 14, column: 45, scope: !132) -// CHECK:STDOUT: !138 = !{!133} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !124, line: 17, type: !77, spFlags: DISPFlagDefinition, unit: !125) -// CHECK:STDOUT: !140 = !DILocation(line: 18, column: 3, scope: !139) -// CHECK:STDOUT: !141 = !DILocation(line: 20, column: 3, scope: !139) -// CHECK:STDOUT: !142 = !DILocation(line: 22, column: 3, scope: !139) -// CHECK:STDOUT: !143 = !DILocation(line: 17, column: 1, scope: !139) -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !147) +// CHECK:STDOUT: !116 = !DIFile(filename: "initialize_from_tuple.carbon", directory: "") +// CHECK:STDOUT: !117 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !116, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !120 = !{!23, !23} +// CHECK:STDOUT: !121 = !DISubroutineType(types: !120) +// CHECK:STDOUT: !122 = !{null, !23} +// CHECK:STDOUT: !123 = !DISubroutineType(types: !122) +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core", scope: null, file: !116, line: 14, type: !121, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !130) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !23) +// CHECK:STDOUT: !129 = !DILocation(line: 14, column: 45, scope: !124) +// CHECK:STDOUT: !130 = !{!125} +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !116, line: 17, type: !77, spFlags: DISPFlagDefinition, unit: !117) +// CHECK:STDOUT: !132 = !DILocation(line: 18, column: 3, scope: !131) +// CHECK:STDOUT: !133 = !DILocation(line: 20, column: 3, scope: !131) +// CHECK:STDOUT: !134 = !DILocation(line: 22, column: 3, scope: !131) +// CHECK:STDOUT: !135 = !DILocation(line: 17, column: 1, scope: !131) +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !139) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !23) +// CHECK:STDOUT: !138 = !DILocation(line: 8, column: 3, scope: !136) +// CHECK:STDOUT: !139 = !{!137} +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !143) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !23) +// CHECK:STDOUT: !142 = !DILocation(line: 8, column: 3, scope: !140) +// CHECK:STDOUT: !143 = !{!141} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !147) // CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !23) // CHECK:STDOUT: !146 = !DILocation(line: 8, column: 3, scope: !144) // CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !151) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92e03c783d6af646:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !151) // CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !23) // CHECK:STDOUT: !150 = !DILocation(line: 8, column: 3, scope: !148) // CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !155) +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !155) // CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !23) // CHECK:STDOUT: !154 = !DILocation(line: 8, column: 3, scope: !152) // CHECK:STDOUT: !155 = !{!153} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !159) +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !159) // CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !23) // CHECK:STDOUT: !158 = !DILocation(line: 8, column: 3, scope: !156) // CHECK:STDOUT: !159 = !{!157} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !163) +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !116, line: 8, type: !123, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !163) // CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !23) // CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !160) // CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !167) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !23) -// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 3, scope: !164) -// CHECK:STDOUT: !167 = !{!165} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c02ca82d7b9fa3c:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !171) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !23) -// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 3, scope: !168) -// CHECK:STDOUT: !171 = !{!169} -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !175) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !23) -// CHECK:STDOUT: !174 = !DILocation(line: 8, column: 3, scope: !172) -// CHECK:STDOUT: !175 = !{!173} -// CHECK:STDOUT: !176 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !179) -// CHECK:STDOUT: !177 = !DILocalVariable(arg: 1, scope: !176, type: !23) -// CHECK:STDOUT: !178 = !DILocation(line: 8, column: 3, scope: !176) -// CHECK:STDOUT: !179 = !{!177} -// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !124, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !125) +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !116, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !117) +// CHECK:STDOUT: !165 = !DILocation(line: 8, column: 3, scope: !164) +// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 21, scope: !164) +// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 22, scope: !164) +// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 30, scope: !164) +// CHECK:STDOUT: !169 = !DILocation(line: 8, column: 38, scope: !164) +// CHECK:STDOUT: !171 = !DILocation(line: 7, column: 1, scope: !164) +// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cd5dea75f888aed4", scope: null, file: !116, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !117) +// CHECK:STDOUT: !173 = !DILocation(line: 8, column: 3, scope: !172) +// CHECK:STDOUT: !174 = !DILocation(line: 8, column: 21, scope: !172) +// CHECK:STDOUT: !175 = !DILocation(line: 8, column: 22, scope: !172) +// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 30, scope: !172) +// CHECK:STDOUT: !177 = !DILocation(line: 8, column: 38, scope: !172) +// CHECK:STDOUT: !179 = !DILocation(line: 7, column: 1, scope: !172) +// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !116, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !117) // CHECK:STDOUT: !181 = !DILocation(line: 8, column: 3, scope: !180) -// CHECK:STDOUT: !182 = !DILocation(line: 8, column: 21, scope: !180) -// CHECK:STDOUT: !183 = !DILocation(line: 8, column: 22, scope: !180) -// CHECK:STDOUT: !184 = !DILocation(line: 8, column: 30, scope: !180) -// CHECK:STDOUT: !185 = !DILocation(line: 8, column: 38, scope: !180) +// CHECK:STDOUT: !182 = !DILocation(line: 8, column: 22, scope: !180) +// CHECK:STDOUT: !183 = !DILocation(line: 8, column: 30, scope: !180) +// CHECK:STDOUT: !184 = !DILocation(line: 8, column: 38, scope: !180) +// CHECK:STDOUT: !185 = !DILocation(line: 8, column: 21, scope: !180) // CHECK:STDOUT: !187 = !DILocation(line: 7, column: 1, scope: !180) -// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.cd5dea75f888aed4", scope: null, file: !124, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !125) -// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 3, scope: !188) -// CHECK:STDOUT: !190 = !DILocation(line: 8, column: 21, scope: !188) -// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 22, scope: !188) -// CHECK:STDOUT: !192 = !DILocation(line: 8, column: 30, scope: !188) -// CHECK:STDOUT: !193 = !DILocation(line: 8, column: 38, scope: !188) -// CHECK:STDOUT: !195 = !DILocation(line: 7, column: 1, scope: !188) -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !124, line: 7, type: !77, spFlags: DISPFlagDefinition, unit: !125) -// CHECK:STDOUT: !197 = !DILocation(line: 8, column: 3, scope: !196) -// CHECK:STDOUT: !198 = !DILocation(line: 8, column: 22, scope: !196) -// CHECK:STDOUT: !199 = !DILocation(line: 8, column: 30, scope: !196) -// CHECK:STDOUT: !200 = !DILocation(line: 8, column: 38, scope: !196) -// CHECK:STDOUT: !201 = !DILocation(line: 8, column: 21, scope: !196) -// CHECK:STDOUT: !203 = !DILocation(line: 7, column: 1, scope: !196) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_nested_literal.carbon' @@ -637,198 +593,184 @@ fn Test2(c: C) { // CHECK:STDOUT: declare void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr sret({}), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !206 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !190 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !207 -// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !208 -// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !209 -// CHECK:STDOUT: ret void, !dbg !210 +// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !191 +// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !192 +// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !193 +// CHECK:STDOUT: ret void, !dbg !194 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !195 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !199 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !203 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self), !dbg !209 +// CHECK:STDOUT: ret void, !dbg !209 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !211 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !215 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self), !dbg !217 // CHECK:STDOUT: ret void, !dbg !217 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !219 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !221 // CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !223 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !225 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !227 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !227 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self), !dbg !229 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self), !dbg !229 // CHECK:STDOUT: ret void, !dbg !229 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !231 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !231 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !235 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !235 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self), !dbg !237 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self), !dbg !237 // CHECK:STDOUT: ret void, !dbg !237 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !239 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !239 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !241 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !243 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !243 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core"(ptr %self), !dbg !245 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self), !dbg !245 // CHECK:STDOUT: ret void, !dbg !245 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !247 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !247 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !249 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !251 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !251 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self), !dbg !253 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !253 // CHECK:STDOUT: ret void, !dbg !253 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !255 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !255 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !257 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !259 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !259 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core"(ptr %self), !dbg !261 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self), !dbg !261 // CHECK:STDOUT: ret void, !dbg !261 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !263 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !263 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !265 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !264 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !264 +// CHECK:STDOUT: %tuple.elem0.a28.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !266 +// CHECK:STDOUT: %.d62.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 0, !dbg !265 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.d62.a), !dbg !267 +// CHECK:STDOUT: %.162.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 1, !dbg !265 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.162.b), !dbg !268 +// CHECK:STDOUT: %tuple.elem1.79b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !266 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.79b.tuple.elem), !dbg !269 +// CHECK:STDOUT: call void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %w.var), !dbg !264 +// CHECK:STDOUT: ret void, !dbg !271 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !267 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !272 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self), !dbg !269 -// CHECK:STDOUT: ret void, !dbg !269 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !273 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !273 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !273 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !273 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !273 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !273 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !274 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !273 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !275 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !273 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !277 +// CHECK:STDOUT: %tuple.elem0.25a.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !278 +// CHECK:STDOUT: %.e68.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 0, !dbg !276 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.e68.a, ptr %.7a56fd.1.temp), !dbg !276 +// CHECK:STDOUT: %.9f2.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 1, !dbg !276 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.9f2.b, ptr %.7a56fd.2.temp), !dbg !276 +// CHECK:STDOUT: %tuple.elem1.0e1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !278 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.0e1.tuple.elem, ptr %.7a56fd.3.temp), !dbg !278 +// CHECK:STDOUT: call void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %w.var), !dbg !273 +// CHECK:STDOUT: ret void, !dbg !280 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !271 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !281 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !273 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !275 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !277 -// CHECK:STDOUT: ret void, !dbg !277 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !279 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !281 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !283 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self), !dbg !285 -// CHECK:STDOUT: ret void, !dbg !285 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !287 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !288 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !288 -// CHECK:STDOUT: %tuple.elem0.a28.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !290 -// CHECK:STDOUT: %.d62.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 0, !dbg !289 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.d62.a), !dbg !291 -// CHECK:STDOUT: %.162.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.a28.tuple.elem, i32 0, i32 1, !dbg !289 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.162.b), !dbg !292 -// CHECK:STDOUT: %tuple.elem1.79b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !290 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.79b.tuple.elem), !dbg !293 -// CHECK:STDOUT: call void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %w.var), !dbg !288 -// CHECK:STDOUT: ret void, !dbg !295 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !296 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !297 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !297 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !297 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !297 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !297 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !297 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !298 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !297 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !299 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !297 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !301 -// CHECK:STDOUT: %tuple.elem0.25a.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !302 -// CHECK:STDOUT: %.e68.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 0, !dbg !300 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.e68.a, ptr %.7a56fd.1.temp), !dbg !300 -// CHECK:STDOUT: %.9f2.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.25a.tuple.elem, i32 0, i32 1, !dbg !300 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.9f2.b, ptr %.7a56fd.2.temp), !dbg !300 -// CHECK:STDOUT: %tuple.elem1.0e1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !302 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.0e1.tuple.elem, ptr %.7a56fd.3.temp), !dbg !302 -// CHECK:STDOUT: call void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %w.var), !dbg !297 -// CHECK:STDOUT: ret void, !dbg !304 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !305 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !306 -// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !306 -// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !306 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !306 -// CHECK:STDOUT: %tuple.elem0.d0d.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !308 -// CHECK:STDOUT: %.b76.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 0, !dbg !307 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.b76.a), !dbg !309 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !306 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !310 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !306 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !311 -// CHECK:STDOUT: %.25e.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 1, !dbg !307 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.25e.b, ptr %.7a56fd.4.temp), !dbg !307 -// CHECK:STDOUT: %tuple.elem1.c76.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !308 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.c76.tuple.elem, ptr %.7a56fd.5.temp), !dbg !308 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %w.var), !dbg !306 -// CHECK:STDOUT: ret void, !dbg !313 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !282 +// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !282 +// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !282 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !282 +// CHECK:STDOUT: %tuple.elem0.d0d.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !284 +// CHECK:STDOUT: %.b76.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 0, !dbg !283 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.b76.a), !dbg !285 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !282 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !286 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !282 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !287 +// CHECK:STDOUT: %.25e.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.d0d.tuple.elem, i32 0, i32 1, !dbg !283 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.25e.b, ptr %.7a56fd.4.temp), !dbg !283 +// CHECK:STDOUT: %tuple.elem1.c76.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !284 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.c76.tuple.elem, ptr %.7a56fd.5.temp), !dbg !284 +// CHECK:STDOUT: call void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %w.var), !dbg !282 +// CHECK:STDOUT: ret void, !dbg !289 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -840,7 +782,7 @@ fn Test2(c: C) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!205} +// CHECK:STDOUT: !llvm.dbg.cu = !{!189} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -848,158 +790,150 @@ fn Test2(c: C) { // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !76 = !{null} // CHECK:STDOUT: !77 = !DISubroutineType(types: !76) -// CHECK:STDOUT: !130 = !{null, !23} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !204 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") -// CHECK:STDOUT: !205 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !204, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !204, line: 24, type: !77, spFlags: DISPFlagDefinition, unit: !205) -// CHECK:STDOUT: !207 = !DILocation(line: 25, column: 3, scope: !206) -// CHECK:STDOUT: !208 = !DILocation(line: 27, column: 3, scope: !206) -// CHECK:STDOUT: !209 = !DILocation(line: 29, column: 3, scope: !206) -// CHECK:STDOUT: !210 = !DILocation(line: 24, column: 1, scope: !206) -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !214) +// CHECK:STDOUT: !122 = !{null, !23} +// CHECK:STDOUT: !123 = !DISubroutineType(types: !122) +// CHECK:STDOUT: !188 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") +// CHECK:STDOUT: !189 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !188, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !188, line: 24, type: !77, spFlags: DISPFlagDefinition, unit: !189) +// CHECK:STDOUT: !191 = !DILocation(line: 25, column: 3, scope: !190) +// CHECK:STDOUT: !192 = !DILocation(line: 27, column: 3, scope: !190) +// CHECK:STDOUT: !193 = !DILocation(line: 29, column: 3, scope: !190) +// CHECK:STDOUT: !194 = !DILocation(line: 24, column: 1, scope: !190) +// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !198) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !23) +// CHECK:STDOUT: !197 = !DILocation(line: 9, column: 3, scope: !195) +// CHECK:STDOUT: !198 = !{!196} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !202) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !23) +// CHECK:STDOUT: !201 = !DILocation(line: 9, column: 3, scope: !199) +// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !206) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !23) +// CHECK:STDOUT: !205 = !DILocation(line: 9, column: 3, scope: !203) +// CHECK:STDOUT: !206 = !{!204} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !210) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !23) +// CHECK:STDOUT: !209 = !DILocation(line: 9, column: 3, scope: !207) +// CHECK:STDOUT: !210 = !{!208} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !214) // CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !23) // CHECK:STDOUT: !213 = !DILocation(line: 9, column: 3, scope: !211) // CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !218) +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !218) // CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !23) // CHECK:STDOUT: !217 = !DILocation(line: 9, column: 3, scope: !215) // CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !222) +// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !222) // CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !23) // CHECK:STDOUT: !221 = !DILocation(line: 9, column: 3, scope: !219) // CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !226) +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !226) // CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !23) // CHECK:STDOUT: !225 = !DILocation(line: 9, column: 3, scope: !223) // CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !230) +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !230) // CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !23) // CHECK:STDOUT: !229 = !DILocation(line: 9, column: 3, scope: !227) // CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !234) +// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !234) // CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !23) // CHECK:STDOUT: !233 = !DILocation(line: 9, column: 3, scope: !231) // CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !238) +// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f43e328c637647f:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !238) // CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !23) // CHECK:STDOUT: !237 = !DILocation(line: 9, column: 3, scope: !235) // CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !242) +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !242) // CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !23) // CHECK:STDOUT: !241 = !DILocation(line: 9, column: 3, scope: !239) // CHECK:STDOUT: !242 = !{!240} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !246) +// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !246) // CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !23) // CHECK:STDOUT: !245 = !DILocation(line: 9, column: 3, scope: !243) // CHECK:STDOUT: !246 = !{!244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !250) +// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !250) // CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !23) // CHECK:STDOUT: !249 = !DILocation(line: 9, column: 3, scope: !247) // CHECK:STDOUT: !250 = !{!248} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !254) +// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !254) // CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !23) // CHECK:STDOUT: !253 = !DILocation(line: 9, column: 3, scope: !251) // CHECK:STDOUT: !254 = !{!252} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !258) +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !258) // CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !23) // CHECK:STDOUT: !257 = !DILocation(line: 9, column: 3, scope: !255) // CHECK:STDOUT: !258 = !{!256} -// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f43e328c637647f:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !262) +// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !188, line: 9, type: !123, spFlags: DISPFlagDefinition, unit: !189, retainedNodes: !262) // CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !23) // CHECK:STDOUT: !261 = !DILocation(line: 9, column: 3, scope: !259) // CHECK:STDOUT: !262 = !{!260} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !266) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !23) -// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 3, scope: !263) -// CHECK:STDOUT: !266 = !{!264} -// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !270) -// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !23) -// CHECK:STDOUT: !269 = !DILocation(line: 9, column: 3, scope: !267) -// CHECK:STDOUT: !270 = !{!268} -// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !274) -// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !23) -// CHECK:STDOUT: !273 = !DILocation(line: 9, column: 3, scope: !271) -// CHECK:STDOUT: !274 = !{!272} -// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !278) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !23) -// CHECK:STDOUT: !277 = !DILocation(line: 9, column: 3, scope: !275) -// CHECK:STDOUT: !278 = !{!276} -// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !282) -// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !23) -// CHECK:STDOUT: !281 = !DILocation(line: 9, column: 3, scope: !279) -// CHECK:STDOUT: !282 = !{!280} -// CHECK:STDOUT: !283 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !204, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !205, retainedNodes: !286) -// CHECK:STDOUT: !284 = !DILocalVariable(arg: 1, scope: !283, type: !23) -// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 3, scope: !283) -// CHECK:STDOUT: !286 = !{!284} -// CHECK:STDOUT: !287 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !204, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !205) -// CHECK:STDOUT: !288 = !DILocation(line: 9, column: 3, scope: !287) -// CHECK:STDOUT: !289 = !DILocation(line: 9, column: 22, scope: !287) -// CHECK:STDOUT: !290 = !DILocation(line: 9, column: 21, scope: !287) -// CHECK:STDOUT: !291 = !DILocation(line: 9, column: 28, scope: !287) -// CHECK:STDOUT: !292 = !DILocation(line: 9, column: 41, scope: !287) -// CHECK:STDOUT: !293 = !DILocation(line: 9, column: 50, scope: !287) -// CHECK:STDOUT: !295 = !DILocation(line: 8, column: 1, scope: !287) -// CHECK:STDOUT: !296 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !204, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !205) -// CHECK:STDOUT: !297 = !DILocation(line: 9, column: 3, scope: !296) -// CHECK:STDOUT: !298 = !DILocation(line: 9, column: 28, scope: !296) -// CHECK:STDOUT: !299 = !DILocation(line: 9, column: 41, scope: !296) -// CHECK:STDOUT: !300 = !DILocation(line: 9, column: 22, scope: !296) -// CHECK:STDOUT: !301 = !DILocation(line: 9, column: 50, scope: !296) -// CHECK:STDOUT: !302 = !DILocation(line: 9, column: 21, scope: !296) -// CHECK:STDOUT: !304 = !DILocation(line: 8, column: 1, scope: !296) -// CHECK:STDOUT: !305 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !204, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !205) -// CHECK:STDOUT: !306 = !DILocation(line: 9, column: 3, scope: !305) -// CHECK:STDOUT: !307 = !DILocation(line: 9, column: 22, scope: !305) -// CHECK:STDOUT: !308 = !DILocation(line: 9, column: 21, scope: !305) -// CHECK:STDOUT: !309 = !DILocation(line: 9, column: 28, scope: !305) -// CHECK:STDOUT: !310 = !DILocation(line: 9, column: 41, scope: !305) -// CHECK:STDOUT: !311 = !DILocation(line: 9, column: 50, scope: !305) -// CHECK:STDOUT: !313 = !DILocation(line: 8, column: 1, scope: !305) +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !188, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !189) +// CHECK:STDOUT: !264 = !DILocation(line: 9, column: 3, scope: !263) +// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 22, scope: !263) +// CHECK:STDOUT: !266 = !DILocation(line: 9, column: 21, scope: !263) +// CHECK:STDOUT: !267 = !DILocation(line: 9, column: 28, scope: !263) +// CHECK:STDOUT: !268 = !DILocation(line: 9, column: 41, scope: !263) +// CHECK:STDOUT: !269 = !DILocation(line: 9, column: 50, scope: !263) +// CHECK:STDOUT: !271 = !DILocation(line: 8, column: 1, scope: !263) +// CHECK:STDOUT: !272 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !188, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !189) +// CHECK:STDOUT: !273 = !DILocation(line: 9, column: 3, scope: !272) +// CHECK:STDOUT: !274 = !DILocation(line: 9, column: 28, scope: !272) +// CHECK:STDOUT: !275 = !DILocation(line: 9, column: 41, scope: !272) +// CHECK:STDOUT: !276 = !DILocation(line: 9, column: 22, scope: !272) +// CHECK:STDOUT: !277 = !DILocation(line: 9, column: 50, scope: !272) +// CHECK:STDOUT: !278 = !DILocation(line: 9, column: 21, scope: !272) +// CHECK:STDOUT: !280 = !DILocation(line: 8, column: 1, scope: !272) +// CHECK:STDOUT: !281 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !188, line: 8, type: !77, spFlags: DISPFlagDefinition, unit: !189) +// CHECK:STDOUT: !282 = !DILocation(line: 9, column: 3, scope: !281) +// CHECK:STDOUT: !283 = !DILocation(line: 9, column: 22, scope: !281) +// CHECK:STDOUT: !284 = !DILocation(line: 9, column: 21, scope: !281) +// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 28, scope: !281) +// CHECK:STDOUT: !286 = !DILocation(line: 9, column: 41, scope: !281) +// CHECK:STDOUT: !287 = !DILocation(line: 9, column: 50, scope: !281) +// CHECK:STDOUT: !289 = !DILocation(line: 8, column: 1, scope: !281) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'as.carbon' // CHECK:STDOUT: source_filename = "as.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !316 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !292 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.84588f41d61dafba(i32 %n), !dbg !320 -// CHECK:STDOUT: ret void, !dbg !323 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.84588f41d61dafba(i32 %n), !dbg !296 +// CHECK:STDOUT: ret void, !dbg !299 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !325 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !301 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !330 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !330 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !331 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !306 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !306 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !307 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !333 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !309 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !337 -// CHECK:STDOUT: ret void, !dbg !340 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !313 +// CHECK:STDOUT: ret void, !dbg !316 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.84588f41d61dafba(i32 %x) #0 !dbg !342 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.84588f41d61dafba(i32 %x) #0 !dbg !318 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !348 +// CHECK:STDOUT: ret i32 %x, !dbg !324 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !350 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !326 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !355 -// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !356 +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !331 +// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !332 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!315} +// CHECK:STDOUT: !llvm.dbg.cu = !{!291} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1012,77 +946,77 @@ fn Test2(c: C) { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !78 = !{null, !20} // CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !130 = !{null, !23} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !314 = !DIFile(filename: "as.carbon", directory: "") -// CHECK:STDOUT: !315 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !314, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !316 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !314, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !315, retainedNodes: !324) -// CHECK:STDOUT: !317 = !DILocalVariable(arg: 1, scope: !316, type: !20) -// CHECK:STDOUT: !320 = !DILocation(line: 9, column: 16, scope: !316) -// CHECK:STDOUT: !323 = !DILocation(line: 8, column: 1, scope: !316) -// CHECK:STDOUT: !324 = !{!317} -// CHECK:STDOUT: !325 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !314, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !315, retainedNodes: !332) -// CHECK:STDOUT: !326 = !DILocalVariable(arg: 1, scope: !325, type: !23) -// CHECK:STDOUT: !330 = !DILocation(line: 15, column: 38, scope: !325) -// CHECK:STDOUT: !331 = !DILocation(line: 15, column: 31, scope: !325) -// CHECK:STDOUT: !332 = !{!326} -// CHECK:STDOUT: !333 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !314, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !315, retainedNodes: !341) -// CHECK:STDOUT: !334 = !DILocalVariable(arg: 1, scope: !333, type: !23) -// CHECK:STDOUT: !337 = !DILocation(line: 20, column: 16, scope: !333) -// CHECK:STDOUT: !340 = !DILocation(line: 19, column: 1, scope: !333) -// CHECK:STDOUT: !341 = !{!334} -// CHECK:STDOUT: !342 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.84588f41d61dafba", scope: null, file: !314, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !315, retainedNodes: !349) -// CHECK:STDOUT: !343 = !DILocalVariable(arg: 1, scope: !342, type: !20) -// CHECK:STDOUT: !348 = !DILocation(line: 5, column: 3, scope: !342) -// CHECK:STDOUT: !349 = !{!343} -// CHECK:STDOUT: !350 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !314, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !315, retainedNodes: !357) -// CHECK:STDOUT: !351 = !DILocalVariable(arg: 1, scope: !350, type: !23) -// CHECK:STDOUT: !355 = !DILocation(line: 5, column: 10, scope: !350) -// CHECK:STDOUT: !356 = !DILocation(line: 5, column: 3, scope: !350) -// CHECK:STDOUT: !357 = !{!351} +// CHECK:STDOUT: !122 = !{null, !23} +// CHECK:STDOUT: !123 = !DISubroutineType(types: !122) +// CHECK:STDOUT: !290 = !DIFile(filename: "as.carbon", directory: "") +// CHECK:STDOUT: !291 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !290, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !292 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !290, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !291, retainedNodes: !300) +// CHECK:STDOUT: !293 = !DILocalVariable(arg: 1, scope: !292, type: !20) +// CHECK:STDOUT: !296 = !DILocation(line: 9, column: 16, scope: !292) +// CHECK:STDOUT: !299 = !DILocation(line: 8, column: 1, scope: !292) +// CHECK:STDOUT: !300 = !{!293} +// CHECK:STDOUT: !301 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !290, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !291, retainedNodes: !308) +// CHECK:STDOUT: !302 = !DILocalVariable(arg: 1, scope: !301, type: !23) +// CHECK:STDOUT: !306 = !DILocation(line: 15, column: 38, scope: !301) +// CHECK:STDOUT: !307 = !DILocation(line: 15, column: 31, scope: !301) +// CHECK:STDOUT: !308 = !{!302} +// CHECK:STDOUT: !309 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !290, line: 19, type: !123, spFlags: DISPFlagDefinition, unit: !291, retainedNodes: !317) +// CHECK:STDOUT: !310 = !DILocalVariable(arg: 1, scope: !309, type: !23) +// CHECK:STDOUT: !313 = !DILocation(line: 20, column: 16, scope: !309) +// CHECK:STDOUT: !316 = !DILocation(line: 19, column: 1, scope: !309) +// CHECK:STDOUT: !317 = !{!310} +// CHECK:STDOUT: !318 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.84588f41d61dafba", scope: null, file: !290, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !291, retainedNodes: !325) +// CHECK:STDOUT: !319 = !DILocalVariable(arg: 1, scope: !318, type: !20) +// CHECK:STDOUT: !324 = !DILocation(line: 5, column: 3, scope: !318) +// CHECK:STDOUT: !325 = !{!319} +// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !290, line: 4, type: !25, spFlags: DISPFlagDefinition, unit: !291, retainedNodes: !333) +// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !23) +// CHECK:STDOUT: !331 = !DILocation(line: 5, column: 10, scope: !326) +// CHECK:STDOUT: !332 = !DILocation(line: 5, column: 3, scope: !326) +// CHECK:STDOUT: !333 = !{!327} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'as_type.carbon' // CHECK:STDOUT: source_filename = "as_type.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !360 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !336 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.8122a03446648385(i32 %n), !dbg !364 -// CHECK:STDOUT: ret void, !dbg !365 +// CHECK:STDOUT: call void @_CAsType.Main.8122a03446648385(i32 %n), !dbg !340 +// CHECK:STDOUT: ret void, !dbg !341 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !367 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %self) #0 !dbg !343 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !372 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !372 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !373 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !348 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !348 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !349 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !375 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !351 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.3280a9d16838b780(ptr %c), !dbg !379 -// CHECK:STDOUT: ret void, !dbg !380 +// CHECK:STDOUT: call void @_CAsType.Main.3280a9d16838b780(ptr %c), !dbg !355 +// CHECK:STDOUT: ret void, !dbg !356 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.8122a03446648385(i32 %x) #0 !dbg !382 { +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.8122a03446648385(i32 %x) #0 !dbg !358 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !388 +// CHECK:STDOUT: ret void, !dbg !364 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.3280a9d16838b780(ptr %x) #0 !dbg !390 { +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.3280a9d16838b780(ptr %x) #0 !dbg !366 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !393 -// CHECK:STDOUT: ret void, !dbg !396 +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.84588f41d61dafba.Core"(ptr %x), !dbg !369 +// CHECK:STDOUT: ret void, !dbg !372 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!359} +// CHECK:STDOUT: !llvm.dbg.cu = !{!335} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1093,32 +1027,32 @@ fn Test2(c: C) { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !78 = !{null, !20} // CHECK:STDOUT: !79 = !DISubroutineType(types: !78) -// CHECK:STDOUT: !130 = !{null, !23} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !358 = !DIFile(filename: "as_type.carbon", directory: "") -// CHECK:STDOUT: !359 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !358, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !360 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !358, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !359, retainedNodes: !366) -// CHECK:STDOUT: !361 = !DILocalVariable(arg: 1, scope: !360, type: !20) -// CHECK:STDOUT: !364 = !DILocation(line: 9, column: 3, scope: !360) -// CHECK:STDOUT: !365 = !DILocation(line: 8, column: 1, scope: !360) -// CHECK:STDOUT: !366 = !{!361} -// CHECK:STDOUT: !367 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !358, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !359, retainedNodes: !374) -// CHECK:STDOUT: !368 = !DILocalVariable(arg: 1, scope: !367, type: !23) -// CHECK:STDOUT: !372 = !DILocation(line: 15, column: 38, scope: !367) -// CHECK:STDOUT: !373 = !DILocation(line: 15, column: 31, scope: !367) -// CHECK:STDOUT: !374 = !{!368} -// CHECK:STDOUT: !375 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !358, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !359, retainedNodes: !381) -// CHECK:STDOUT: !376 = !DILocalVariable(arg: 1, scope: !375, type: !23) -// CHECK:STDOUT: !379 = !DILocation(line: 20, column: 3, scope: !375) -// CHECK:STDOUT: !380 = !DILocation(line: 19, column: 1, scope: !375) -// CHECK:STDOUT: !381 = !{!376} -// CHECK:STDOUT: !382 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.8122a03446648385", scope: null, file: !358, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !359, retainedNodes: !389) -// CHECK:STDOUT: !383 = !DILocalVariable(arg: 1, scope: !382, type: !20) -// CHECK:STDOUT: !388 = !DILocation(line: 4, column: 1, scope: !382) -// CHECK:STDOUT: !389 = !{!383} -// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.3280a9d16838b780", scope: null, file: !358, line: 4, type: !131, spFlags: DISPFlagDefinition, unit: !359, retainedNodes: !397) -// CHECK:STDOUT: !391 = !DILocalVariable(arg: 1, scope: !390, type: !23) -// CHECK:STDOUT: !393 = !DILocation(line: 5, column: 14, scope: !390) -// CHECK:STDOUT: !396 = !DILocation(line: 4, column: 1, scope: !390) -// CHECK:STDOUT: !397 = !{!391} +// CHECK:STDOUT: !122 = !{null, !23} +// CHECK:STDOUT: !123 = !DISubroutineType(types: !122) +// CHECK:STDOUT: !334 = !DIFile(filename: "as_type.carbon", directory: "") +// CHECK:STDOUT: !335 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !334, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !336 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !334, line: 8, type: !79, spFlags: DISPFlagDefinition, unit: !335, retainedNodes: !342) +// CHECK:STDOUT: !337 = !DILocalVariable(arg: 1, scope: !336, type: !20) +// CHECK:STDOUT: !340 = !DILocation(line: 9, column: 3, scope: !336) +// CHECK:STDOUT: !341 = !DILocation(line: 8, column: 1, scope: !336) +// CHECK:STDOUT: !342 = !{!337} +// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.84588f41d61dafba.Core", scope: null, file: !334, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !335, retainedNodes: !350) +// CHECK:STDOUT: !344 = !DILocalVariable(arg: 1, scope: !343, type: !23) +// CHECK:STDOUT: !348 = !DILocation(line: 15, column: 38, scope: !343) +// CHECK:STDOUT: !349 = !DILocation(line: 15, column: 31, scope: !343) +// CHECK:STDOUT: !350 = !{!344} +// CHECK:STDOUT: !351 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !334, line: 19, type: !123, spFlags: DISPFlagDefinition, unit: !335, retainedNodes: !357) +// CHECK:STDOUT: !352 = !DILocalVariable(arg: 1, scope: !351, type: !23) +// CHECK:STDOUT: !355 = !DILocation(line: 20, column: 3, scope: !351) +// CHECK:STDOUT: !356 = !DILocation(line: 19, column: 1, scope: !351) +// CHECK:STDOUT: !357 = !{!352} +// CHECK:STDOUT: !358 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.8122a03446648385", scope: null, file: !334, line: 4, type: !79, spFlags: DISPFlagDefinition, unit: !335, retainedNodes: !365) +// CHECK:STDOUT: !359 = !DILocalVariable(arg: 1, scope: !358, type: !20) +// CHECK:STDOUT: !364 = !DILocation(line: 4, column: 1, scope: !358) +// CHECK:STDOUT: !365 = !{!359} +// CHECK:STDOUT: !366 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.3280a9d16838b780", scope: null, file: !334, line: 4, type: !123, spFlags: DISPFlagDefinition, unit: !335, retainedNodes: !373) +// CHECK:STDOUT: !367 = !DILocalVariable(arg: 1, scope: !366, type: !23) +// CHECK:STDOUT: !369 = !DILocation(line: 5, column: 14, scope: !366) +// CHECK:STDOUT: !372 = !DILocation(line: 4, column: 1, scope: !366) +// CHECK:STDOUT: !373 = !{!367} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/merging.carbon b/toolchain/lower/testdata/template/merging.carbon index e814f2c48de4..b6287e0897a5 100644 --- a/toolchain/lower/testdata/template/merging.carbon +++ b/toolchain/lower/testdata/template/merging.carbon @@ -217,111 +217,90 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !61 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !73 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !79 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %self) #0 !dbg !81 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core"(ptr %self), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !83 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.bd4fb75a414fe858() #0 !dbg !85 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.bd4fb75a414fe858() #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.A.Main(ptr @A.val.A.val), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: call void @_CF.A.Main(ptr @A.val.A.val), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.a6a60dfee2d7d273() #0 !dbg !88 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.a6a60dfee2d7d273() #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.B.Main(ptr @B.val.loc8_45), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: call void @_CF.B.Main(ptr @B.val.loc8_45), !dbg !77 +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.9522ff908e97e267() #0 !dbg !91 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.9522ff908e97e267() #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.4.temp = alloca {}, align 1, !dbg !93 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.4.temp), !dbg !93 -// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.4.temp, ptr @C.val.loc33_13.3), !dbg !93 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.4.temp), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: %.2a64a1.4.temp = alloca {}, align 1, !dbg !81 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.4.temp), !dbg !81 +// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.4.temp, ptr @C.val.loc33_13.3), !dbg !81 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.4.temp), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.931317eeae6ffe17() #0 !dbg !95 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.931317eeae6ffe17() #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.3.temp = alloca {}, align 1, !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.3.temp), !dbg !97 -// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.3.temp, ptr @D.val.loc34_13.3), !dbg !97 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.3.temp), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: %.2a64a1.3.temp = alloca {}, align 1, !dbg !85 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.3.temp), !dbg !85 +// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.3.temp, ptr @D.val.loc34_13.3), !dbg !85 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.3.temp), !dbg !84 +// CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.a6a60dfee2d7d273(ptr %x) #0 !dbg !99 { +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.a6a60dfee2d7d273(ptr %x) #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.B.Main(ptr %x), !dbg !102 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %x), !dbg !90 +// CHECK:STDOUT: ret void, !dbg !91 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.9522ff908e97e267(ptr %x) #0 !dbg !93 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.2a64a1.2.temp = alloca {}, align 1, !dbg !96 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.2.temp), !dbg !96 +// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.2.temp, ptr %x), !dbg !96 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.2.temp), !dbg !96 +// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.931317eeae6ffe17(ptr %x) #0 !dbg !99 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.2a64a1.1.temp = alloca {}, align 1, !dbg !102 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.1.temp), !dbg !102 +// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.1.temp, ptr %x), !dbg !102 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.1.temp), !dbg !102 // CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.9522ff908e97e267(ptr %x) #0 !dbg !105 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.2.temp = alloca {}, align 1, !dbg !108 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.2.temp), !dbg !108 -// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.2.temp, ptr %x), !dbg !108 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.2.temp), !dbg !108 -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.931317eeae6ffe17(ptr %x) #0 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.1.temp = alloca {}, align 1, !dbg !114 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.1.temp), !dbg !114 -// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.1.temp, ptr %x), !dbg !114 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.1.temp), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !115 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 1, 6, 5, 4, 3, 2 } @@ -369,59 +348,47 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !24) // CHECK:STDOUT: !59 = !DILocation(line: 32, column: 10, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !22, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !64) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !22, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !64) // CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !24) // CHECK:STDOUT: !63 = !DILocation(line: 32, column: 10, scope: !61) // CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !22, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !68) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !22, line: 33, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !24) -// CHECK:STDOUT: !67 = !DILocation(line: 32, column: 10, scope: !65) +// CHECK:STDOUT: !67 = !DILocation(line: 33, column: 10, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !22, line: 33, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !22, line: 34, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !72) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !24) -// CHECK:STDOUT: !71 = !DILocation(line: 33, column: 10, scope: !69) +// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 10, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !22, line: 33, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !24) -// CHECK:STDOUT: !75 = !DILocation(line: 33, column: 10, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a50fd899f969e609:core.Destroy.Core", scope: null, file: !22, line: 34, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !24) -// CHECK:STDOUT: !79 = !DILocation(line: 34, column: 10, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !22, line: 34, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !24) -// CHECK:STDOUT: !83 = !DILocation(line: 34, column: 10, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.bd4fb75a414fe858", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) -// CHECK:STDOUT: !86 = !DILocation(line: 18, column: 37, scope: !85) -// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 1, scope: !85) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) -// CHECK:STDOUT: !89 = !DILocation(line: 18, column: 37, scope: !88) -// CHECK:STDOUT: !90 = !DILocation(line: 18, column: 1, scope: !88) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.9522ff908e97e267", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) -// CHECK:STDOUT: !92 = !DILocation(line: 18, column: 37, scope: !91) -// CHECK:STDOUT: !93 = !DILocation(line: 0, scope: !91) -// CHECK:STDOUT: !94 = !DILocation(line: 18, column: 1, scope: !91) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.931317eeae6ffe17", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) -// CHECK:STDOUT: !96 = !DILocation(line: 18, column: 37, scope: !95) -// CHECK:STDOUT: !97 = !DILocation(line: 0, scope: !95) -// CHECK:STDOUT: !98 = !DILocation(line: 18, column: 1, scope: !95) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !104) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.bd4fb75a414fe858", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !74 = !DILocation(line: 18, column: 37, scope: !73) +// CHECK:STDOUT: !75 = !DILocation(line: 18, column: 1, scope: !73) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !77 = !DILocation(line: 18, column: 37, scope: !76) +// CHECK:STDOUT: !78 = !DILocation(line: 18, column: 1, scope: !76) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.9522ff908e97e267", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !80 = !DILocation(line: 18, column: 37, scope: !79) +// CHECK:STDOUT: !81 = !DILocation(line: 0, scope: !79) +// CHECK:STDOUT: !82 = !DILocation(line: 18, column: 1, scope: !79) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.931317eeae6ffe17", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !84 = !DILocation(line: 18, column: 37, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 0, scope: !83) +// CHECK:STDOUT: !86 = !DILocation(line: 18, column: 1, scope: !83) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !92) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !24) +// CHECK:STDOUT: !90 = !DILocation(line: 28, column: 3, scope: !87) +// CHECK:STDOUT: !91 = !DILocation(line: 27, column: 1, scope: !87) +// CHECK:STDOUT: !92 = !{!88} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.9522ff908e97e267", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !98) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !24) +// CHECK:STDOUT: !96 = !DILocation(line: 28, column: 3, scope: !93) +// CHECK:STDOUT: !97 = !DILocation(line: 27, column: 1, scope: !93) +// CHECK:STDOUT: !98 = !{!94} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.931317eeae6ffe17", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !104) // CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !24) // CHECK:STDOUT: !102 = !DILocation(line: 28, column: 3, scope: !99) // CHECK:STDOUT: !103 = !DILocation(line: 27, column: 1, scope: !99) // CHECK:STDOUT: !104 = !{!100} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.9522ff908e97e267", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !110) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !24) -// CHECK:STDOUT: !108 = !DILocation(line: 28, column: 3, scope: !105) -// CHECK:STDOUT: !109 = !DILocation(line: 27, column: 1, scope: !105) -// CHECK:STDOUT: !110 = !{!106} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.931317eeae6ffe17", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !116) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !24) -// CHECK:STDOUT: !114 = !DILocation(line: 28, column: 3, scope: !111) -// CHECK:STDOUT: !115 = !DILocation(line: 27, column: 1, scope: !111) -// CHECK:STDOUT: !116 = !{!112} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'no_merge_convert_one_arg.carbon' @@ -430,65 +397,65 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: @A.val.loc6_45 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !121 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc6_45, i64 0, i1 false), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !126 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc6_45, i64 0, i1 false), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.Main(ptr, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallCallF.Main(ptr %a, ptr %b) #0 !dbg !128 { +// CHECK:STDOUT: define void @_CCallCallF.Main(ptr %a, ptr %b) #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallF.Main.2877a42045e01a3b(ptr %a, ptr %a), !dbg !135 -// CHECK:STDOUT: call void @_CCallF.Main.d01354a0ad5f3687(ptr %a, ptr %b), !dbg !138 -// CHECK:STDOUT: call void @_CCallF.Main.37b67b83fe9ed3dd(ptr %b, ptr %a), !dbg !141 -// CHECK:STDOUT: call void @_CCallF.Main.7096323a0fb88cc3(ptr %b, ptr %b), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: call void @_CCallF.Main.2877a42045e01a3b(ptr %a, ptr %a), !dbg !123 +// CHECK:STDOUT: call void @_CCallF.Main.d01354a0ad5f3687(ptr %a, ptr %b), !dbg !126 +// CHECK:STDOUT: call void @_CCallF.Main.37b67b83fe9ed3dd(ptr %b, ptr %a), !dbg !129 +// CHECK:STDOUT: call void @_CCallF.Main.7096323a0fb88cc3(ptr %b, ptr %b), !dbg !132 +// CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.2877a42045e01a3b(ptr %x, ptr %y) #0 !dbg !147 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.2877a42045e01a3b(ptr %x, ptr %y) #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %y), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %y), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.d01354a0ad5f3687(ptr %x, ptr %y) #0 !dbg !157 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.d01354a0ad5f3687(ptr %x, ptr %y) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.4.temp = alloca {}, align 1, !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.4.temp), !dbg !163 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.4.temp, ptr %y), !dbg !163 -// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %.9745c1.4.temp), !dbg !164 -// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: %.9745c1.4.temp = alloca {}, align 1, !dbg !151 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.4.temp), !dbg !151 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.4.temp, ptr %y), !dbg !151 +// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %.9745c1.4.temp), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.37b67b83fe9ed3dd(ptr %x, ptr %y) #0 !dbg !167 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.37b67b83fe9ed3dd(ptr %x, ptr %y) #0 !dbg !155 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.3.temp = alloca {}, align 1, !dbg !172 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.3.temp), !dbg !172 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.3.temp, ptr %x), !dbg !172 -// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.3.temp, ptr %y), !dbg !174 -// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: %.9745c1.3.temp = alloca {}, align 1, !dbg !160 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.3.temp), !dbg !160 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.3.temp, ptr %x), !dbg !160 +// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.3.temp, ptr %y), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.7096323a0fb88cc3(ptr %x, ptr %y) #0 !dbg !177 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.7096323a0fb88cc3(ptr %x, ptr %y) #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.1.temp = alloca {}, align 1, !dbg !182 -// CHECK:STDOUT: %.9745c1.2.temp = alloca {}, align 1, !dbg !183 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.1.temp), !dbg !182 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.1.temp, ptr %x), !dbg !182 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.2.temp), !dbg !183 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.2.temp, ptr %y), !dbg !183 -// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.1.temp, ptr %.9745c1.2.temp), !dbg !184 -// CHECK:STDOUT: ret void, !dbg !185 +// CHECK:STDOUT: %.9745c1.1.temp = alloca {}, align 1, !dbg !170 +// CHECK:STDOUT: %.9745c1.2.temp = alloca {}, align 1, !dbg !171 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.1.temp), !dbg !170 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.1.temp, ptr %x), !dbg !170 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.2.temp), !dbg !171 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.2.temp, ptr %y), !dbg !171 +// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.1.temp, ptr %.9745c1.2.temp), !dbg !172 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -500,7 +467,7 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!118} +// CHECK:STDOUT: !llvm.dbg.cu = !{!106} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -508,49 +475,49 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !27 = !{!24, !24} // CHECK:STDOUT: !28 = !DISubroutineType(types: !27) -// CHECK:STDOUT: !117 = !DIFile(filename: "no_merge_convert_one_arg.carbon", directory: "") -// CHECK:STDOUT: !118 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !117, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !119 = !{null, !24, !24} -// CHECK:STDOUT: !120 = !DISubroutineType(types: !119) -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !117, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !127) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !24) -// CHECK:STDOUT: !126 = !DILocation(line: 6, column: 36, scope: !121) -// CHECK:STDOUT: !127 = !{!122} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !117, line: 16, type: !120, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !146) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !24) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 2, scope: !128, type: !24) -// CHECK:STDOUT: !135 = !DILocation(line: 17, column: 3, scope: !128) -// CHECK:STDOUT: !138 = !DILocation(line: 18, column: 3, scope: !128) -// CHECK:STDOUT: !141 = !DILocation(line: 19, column: 3, scope: !128) -// CHECK:STDOUT: !144 = !DILocation(line: 20, column: 3, scope: !128) -// CHECK:STDOUT: !145 = !DILocation(line: 16, column: 1, scope: !128) -// CHECK:STDOUT: !146 = !{!129, !130} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.2877a42045e01a3b", scope: null, file: !117, line: 12, type: !120, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !156) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !24) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 2, scope: !147, type: !24) -// CHECK:STDOUT: !154 = !DILocation(line: 13, column: 3, scope: !147) -// CHECK:STDOUT: !155 = !DILocation(line: 12, column: 1, scope: !147) -// CHECK:STDOUT: !156 = !{!148, !149} -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.d01354a0ad5f3687", scope: null, file: !117, line: 12, type: !120, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !166) -// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !24) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 2, scope: !157, type: !24) -// CHECK:STDOUT: !163 = !DILocation(line: 13, column: 8, scope: !157) -// CHECK:STDOUT: !164 = !DILocation(line: 13, column: 3, scope: !157) -// CHECK:STDOUT: !165 = !DILocation(line: 12, column: 1, scope: !157) -// CHECK:STDOUT: !166 = !{!158, !159} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.37b67b83fe9ed3dd", scope: null, file: !117, line: 12, type: !120, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !176) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !24) -// CHECK:STDOUT: !169 = !DILocalVariable(arg: 2, scope: !167, type: !24) -// CHECK:STDOUT: !172 = !DILocation(line: 13, column: 5, scope: !167) -// CHECK:STDOUT: !174 = !DILocation(line: 13, column: 3, scope: !167) -// CHECK:STDOUT: !175 = !DILocation(line: 12, column: 1, scope: !167) -// CHECK:STDOUT: !176 = !{!168, !169} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.7096323a0fb88cc3", scope: null, file: !117, line: 12, type: !120, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !186) -// CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !24) -// CHECK:STDOUT: !179 = !DILocalVariable(arg: 2, scope: !177, type: !24) -// CHECK:STDOUT: !182 = !DILocation(line: 13, column: 5, scope: !177) -// CHECK:STDOUT: !183 = !DILocation(line: 13, column: 8, scope: !177) -// CHECK:STDOUT: !184 = !DILocation(line: 13, column: 3, scope: !177) -// CHECK:STDOUT: !185 = !DILocation(line: 12, column: 1, scope: !177) -// CHECK:STDOUT: !186 = !{!178, !179} +// CHECK:STDOUT: !105 = !DIFile(filename: "no_merge_convert_one_arg.carbon", directory: "") +// CHECK:STDOUT: !106 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !105, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !107 = !{null, !24, !24} +// CHECK:STDOUT: !108 = !DISubroutineType(types: !107) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !105, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !24) +// CHECK:STDOUT: !114 = !DILocation(line: 6, column: 36, scope: !109) +// CHECK:STDOUT: !115 = !{!110} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !105, line: 16, type: !108, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !134) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !24) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !116, type: !24) +// CHECK:STDOUT: !123 = !DILocation(line: 17, column: 3, scope: !116) +// CHECK:STDOUT: !126 = !DILocation(line: 18, column: 3, scope: !116) +// CHECK:STDOUT: !129 = !DILocation(line: 19, column: 3, scope: !116) +// CHECK:STDOUT: !132 = !DILocation(line: 20, column: 3, scope: !116) +// CHECK:STDOUT: !133 = !DILocation(line: 16, column: 1, scope: !116) +// CHECK:STDOUT: !134 = !{!117, !118} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.2877a42045e01a3b", scope: null, file: !105, line: 12, type: !108, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !144) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !24) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 2, scope: !135, type: !24) +// CHECK:STDOUT: !142 = !DILocation(line: 13, column: 3, scope: !135) +// CHECK:STDOUT: !143 = !DILocation(line: 12, column: 1, scope: !135) +// CHECK:STDOUT: !144 = !{!136, !137} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.d01354a0ad5f3687", scope: null, file: !105, line: 12, type: !108, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !154) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !24) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 2, scope: !145, type: !24) +// CHECK:STDOUT: !151 = !DILocation(line: 13, column: 8, scope: !145) +// CHECK:STDOUT: !152 = !DILocation(line: 13, column: 3, scope: !145) +// CHECK:STDOUT: !153 = !DILocation(line: 12, column: 1, scope: !145) +// CHECK:STDOUT: !154 = !{!146, !147} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.37b67b83fe9ed3dd", scope: null, file: !105, line: 12, type: !108, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !164) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !24) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 2, scope: !155, type: !24) +// CHECK:STDOUT: !160 = !DILocation(line: 13, column: 5, scope: !155) +// CHECK:STDOUT: !162 = !DILocation(line: 13, column: 3, scope: !155) +// CHECK:STDOUT: !163 = !DILocation(line: 12, column: 1, scope: !155) +// CHECK:STDOUT: !164 = !{!156, !157} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.7096323a0fb88cc3", scope: null, file: !105, line: 12, type: !108, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !174) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !24) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 2, scope: !165, type: !24) +// CHECK:STDOUT: !170 = !DILocation(line: 13, column: 5, scope: !165) +// CHECK:STDOUT: !171 = !DILocation(line: 13, column: 8, scope: !165) +// CHECK:STDOUT: !172 = !DILocation(line: 13, column: 3, scope: !165) +// CHECK:STDOUT: !173 = !DILocation(line: 12, column: 1, scope: !165) +// CHECK:STDOUT: !174 = !{!166, !167} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index 141d14b49af0..415648875043 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -55,31 +55,24 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -120,20 +113,16 @@ fn Run() -> i32 { // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) // CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) -// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !49) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !25) +// CHECK:STDOUT: !51 = !DILocation(line: 14, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !25) // CHECK:STDOUT: !55 = !DILocation(line: 14, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !25) -// CHECK:STDOUT: !59 = !DILocation(line: 14, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/access/return_value_access.carbon b/toolchain/lower/testdata/tuple/access/return_value_access.carbon index 228619853160..708f2bab0c58 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -54,31 +54,24 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -119,20 +112,16 @@ fn Run() { // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 16, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !20) // CHECK:STDOUT: !46 = !DILocation(line: 16, column: 16, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !21) // CHECK:STDOUT: !50 = !DILocation(line: 16, column: 16, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !21) // CHECK:STDOUT: !54 = !DILocation(line: 16, column: 16, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !21) -// CHECK:STDOUT: !58 = !DILocation(line: 16, column: 16, scope: !56) -// CHECK:STDOUT: !59 = !{!57} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon index 7be9aa7f8a16..fe57f0942f8d 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon @@ -42,44 +42,37 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0159eff107255368:core.Destroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0159eff107255368:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0159eff107255368:core.Destroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.0159eff107255368:core.Destroy.Core"(ptr %self), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0159eff107255368:core.Destroy.Core"(ptr %self) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0159eff107255368:core.Destroy.Core"(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -111,28 +104,24 @@ fn G() { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) // CHECK:STDOUT: !47 = !DILocation(line: 16, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !21) // CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0159eff107255368:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) // CHECK:STDOUT: !55 = !DILocation(line: 16, column: 3, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0159eff107255368:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0159eff107255368:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !21) // CHECK:STDOUT: !59 = !DILocation(line: 16, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0159eff107255368:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !21) -// CHECK:STDOUT: !63 = !DILocation(line: 16, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/one_entry.carbon b/toolchain/lower/testdata/tuple/one_entry.carbon index 58e2f2281110..eaf5fa12ec2c 100644 --- a/toolchain/lower/testdata/tuple/one_entry.carbon +++ b/toolchain/lower/testdata/tuple/one_entry.carbon @@ -44,31 +44,24 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core"(ptr %self), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -103,20 +96,16 @@ fn Run() -> i32 { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !20) // CHECK:STDOUT: !39 = !DILocation(line: 15, column: 3, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) // CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !25) // CHECK:STDOUT: !47 = !DILocation(line: 15, column: 3, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.a8a56634ea0bfe88:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a56634ea0bfe88:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !25) // CHECK:STDOUT: !51 = !DILocation(line: 15, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a8a56634ea0bfe88:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !25) -// CHECK:STDOUT: !55 = !DILocation(line: 15, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index b0233151aca7..9bcb214038fa 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -52,31 +52,24 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !48 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !52 // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core"(ptr %self), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -115,20 +108,16 @@ fn Run() -> i32 { // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 15, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 15, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !25) // CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !25) // CHECK:STDOUT: !52 = !DILocation(line: 15, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e554695bf635d9c1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !25) -// CHECK:STDOUT: !56 = !DILocation(line: 15, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/value_formation.carbon b/toolchain/lower/testdata/tuple/value_formation.carbon index b1973546d251..a2038234ef81 100644 --- a/toolchain/lower/testdata/tuple/value_formation.carbon +++ b/toolchain/lower/testdata/tuple/value_formation.carbon @@ -78,31 +78,24 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !48 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !52 // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -140,20 +133,16 @@ fn F() { // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) // CHECK:STDOUT: !40 = !DILocation(line: 17, column: 3, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) // CHECK:STDOUT: !44 = !DILocation(line: 17, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !21) // CHECK:STDOUT: !48 = !DILocation(line: 17, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !21) // CHECK:STDOUT: !52 = !DILocation(line: 17, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !21) -// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/destroy_control_flow.carbon b/toolchain/lower/testdata/var/destroy_control_flow.carbon index 179ac621fefc..a7ae0f976bef 100644 --- a/toolchain/lower/testdata/var/destroy_control_flow.carbon +++ b/toolchain/lower/testdata/var/destroy_control_flow.carbon @@ -183,18 +183,11 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !73 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -235,14 +228,10 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !34) // CHECK:STDOUT: !67 = !DILocation(line: 9, column: 5, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !42, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !42, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !72) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !34) // CHECK:STDOUT: !71 = !DILocation(line: 9, column: 5, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !42, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !34) -// CHECK:STDOUT: !75 = !DILocation(line: 9, column: 5, scope: !73) -// CHECK:STDOUT: !76 = !{!74} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_else.carbon' @@ -251,57 +240,50 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !79 { +// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !82 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !89 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !82 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !82 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !86 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !88 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !78 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !85 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !91 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !78 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !78 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !82 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !84 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !89 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !89 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !89 -// CHECK:STDOUT: br label %if.done, !dbg !94 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !85 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !85 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !89 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !85 +// CHECK:STDOUT: br label %if.done, !dbg !90 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !95 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !95 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !95 -// CHECK:STDOUT: br label %if.done, !dbg !94 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !91 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !91 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !95 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !91 +// CHECK:STDOUT: br label %if.done, !dbg !90 // CHECK:STDOUT: // CHECK:STDOUT: if.done: ; preds = %if.else, %if.then -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !102 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !98 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !78 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !109 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !111 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self), !dbg !115 -// CHECK:STDOUT: ret void, !dbg !115 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -317,7 +299,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!78} +// CHECK:STDOUT: !llvm.dbg.cu = !{!74} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -325,33 +307,29 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !35 = !{null, !34} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !77 = !DIFile(filename: "if_else.carbon", directory: "") -// CHECK:STDOUT: !78 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !77, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !77, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !104) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !34) -// CHECK:STDOUT: !82 = !DILocation(line: 6, column: 3, scope: !79) -// CHECK:STDOUT: !86 = !DILocation(line: 7, column: 3, scope: !79) -// CHECK:STDOUT: !88 = !DILocation(line: 8, column: 6, scope: !79) -// CHECK:STDOUT: !89 = !DILocation(line: 9, column: 5, scope: !79) -// CHECK:STDOUT: !93 = !DILocation(line: 10, column: 5, scope: !79) -// CHECK:STDOUT: !94 = !DILocation(line: 8, column: 3, scope: !79) -// CHECK:STDOUT: !95 = !DILocation(line: 12, column: 5, scope: !79) -// CHECK:STDOUT: !99 = !DILocation(line: 13, column: 5, scope: !79) -// CHECK:STDOUT: !102 = !DILocation(line: 15, column: 3, scope: !79) -// CHECK:STDOUT: !103 = !DILocation(line: 5, column: 1, scope: !79) -// CHECK:STDOUT: !104 = !{!80} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !77, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !108) +// CHECK:STDOUT: !73 = !DIFile(filename: "if_else.carbon", directory: "") +// CHECK:STDOUT: !74 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !73, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !73, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !100) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !34) +// CHECK:STDOUT: !78 = !DILocation(line: 6, column: 3, scope: !75) +// CHECK:STDOUT: !82 = !DILocation(line: 7, column: 3, scope: !75) +// CHECK:STDOUT: !84 = !DILocation(line: 8, column: 6, scope: !75) +// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 5, scope: !75) +// CHECK:STDOUT: !89 = !DILocation(line: 10, column: 5, scope: !75) +// CHECK:STDOUT: !90 = !DILocation(line: 8, column: 3, scope: !75) +// CHECK:STDOUT: !91 = !DILocation(line: 12, column: 5, scope: !75) +// CHECK:STDOUT: !95 = !DILocation(line: 13, column: 5, scope: !75) +// CHECK:STDOUT: !98 = !DILocation(line: 15, column: 3, scope: !75) +// CHECK:STDOUT: !99 = !DILocation(line: 5, column: 1, scope: !75) +// CHECK:STDOUT: !100 = !{!76} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !73, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !104) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !34) +// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 5, scope: !101) +// CHECK:STDOUT: !104 = !{!102} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !73, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !108) // CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !34) // CHECK:STDOUT: !107 = !DILocation(line: 9, column: 5, scope: !105) // CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !77, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !34) -// CHECK:STDOUT: !111 = !DILocation(line: 9, column: 5, scope: !109) -// CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !77, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !78, retainedNodes: !116) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !34) -// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 5, scope: !113) -// CHECK:STDOUT: !116 = !{!114} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_return.carbon' @@ -360,47 +338,40 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !119 { +// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !111 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !122 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !129 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !122 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !122 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !126 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !128 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !114 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !121 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !114 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !114 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !118 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !120 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !129 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !129 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !133 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !129 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !122 -// CHECK:STDOUT: ret void, !dbg !134 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !121 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !121 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !125 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !121 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !126 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !122 -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !127 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !137 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: ret void, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !141 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !143 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !145 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self), !dbg !147 -// CHECK:STDOUT: ret void, !dbg !147 +// CHECK:STDOUT: ret void, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -418,7 +389,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!118} +// CHECK:STDOUT: !llvm.dbg.cu = !{!110} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -426,30 +397,26 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !35 = !{null, !34} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !117 = !DIFile(filename: "if_return.carbon", directory: "") -// CHECK:STDOUT: !118 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !117, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "IfReturn", linkageName: "_CIfReturn.Main", scope: null, file: !117, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !136) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !34) -// CHECK:STDOUT: !122 = !DILocation(line: 6, column: 3, scope: !119) -// CHECK:STDOUT: !126 = !DILocation(line: 7, column: 3, scope: !119) -// CHECK:STDOUT: !128 = !DILocation(line: 8, column: 6, scope: !119) -// CHECK:STDOUT: !129 = !DILocation(line: 9, column: 5, scope: !119) -// CHECK:STDOUT: !133 = !DILocation(line: 10, column: 5, scope: !119) -// CHECK:STDOUT: !134 = !DILocation(line: 11, column: 5, scope: !119) -// CHECK:STDOUT: !135 = !DILocation(line: 5, column: 1, scope: !119) -// CHECK:STDOUT: !136 = !{!120} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !117, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !140) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !34) -// CHECK:STDOUT: !139 = !DILocation(line: 9, column: 5, scope: !137) -// CHECK:STDOUT: !140 = !{!138} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !117, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !144) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !34) -// CHECK:STDOUT: !143 = !DILocation(line: 9, column: 5, scope: !141) -// CHECK:STDOUT: !144 = !{!142} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !117, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !118, retainedNodes: !148) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !34) -// CHECK:STDOUT: !147 = !DILocation(line: 9, column: 5, scope: !145) -// CHECK:STDOUT: !148 = !{!146} +// CHECK:STDOUT: !109 = !DIFile(filename: "if_return.carbon", directory: "") +// CHECK:STDOUT: !110 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !109, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "IfReturn", linkageName: "_CIfReturn.Main", scope: null, file: !109, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !128) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !34) +// CHECK:STDOUT: !114 = !DILocation(line: 6, column: 3, scope: !111) +// CHECK:STDOUT: !118 = !DILocation(line: 7, column: 3, scope: !111) +// CHECK:STDOUT: !120 = !DILocation(line: 8, column: 6, scope: !111) +// CHECK:STDOUT: !121 = !DILocation(line: 9, column: 5, scope: !111) +// CHECK:STDOUT: !125 = !DILocation(line: 10, column: 5, scope: !111) +// CHECK:STDOUT: !126 = !DILocation(line: 11, column: 5, scope: !111) +// CHECK:STDOUT: !127 = !DILocation(line: 5, column: 1, scope: !111) +// CHECK:STDOUT: !128 = !{!112} +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !109, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !132) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !34) +// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 5, scope: !129) +// CHECK:STDOUT: !132 = !{!130} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !109, line: 9, type: !36, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !136) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !34) +// CHECK:STDOUT: !135 = !DILocation(line: 9, column: 5, scope: !133) +// CHECK:STDOUT: !136 = !{!134} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_break.carbon' @@ -458,63 +425,56 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !151 { +// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !154 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !164 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !171 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !154 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !154 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !158 -// CHECK:STDOUT: br label %while.cond, !dbg !159 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !142 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !152 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !159 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !142 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !142 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !146 +// CHECK:STDOUT: br label %while.cond, !dbg !147 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !159 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !147 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !164 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !164 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !168 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !170 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !151 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !152 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !152 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !156 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !158 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !171 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !171 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !171 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !164 -// CHECK:STDOUT: br label %while.done, !dbg !176 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !159 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !159 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !163 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !159 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !152 +// CHECK:STDOUT: br label %while.done, !dbg !164 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !164 -// CHECK:STDOUT: br label %while.cond, !dbg !177 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !152 +// CHECK:STDOUT: br label %while.cond, !dbg !165 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %if.then, %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !180 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !168 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !185 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !175 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !189 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !191 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self), !dbg !193 -// CHECK:STDOUT: ret void, !dbg !193 +// CHECK:STDOUT: ret void, !dbg !177 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -532,7 +492,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!150} +// CHECK:STDOUT: !llvm.dbg.cu = !{!138} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -540,36 +500,32 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !35 = !{null, !34} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !149 = !DIFile(filename: "while_break.carbon", directory: "") -// CHECK:STDOUT: !150 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !149, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !149, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !182) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !34) -// CHECK:STDOUT: !154 = !DILocation(line: 6, column: 3, scope: !151) -// CHECK:STDOUT: !158 = !DILocation(line: 7, column: 3, scope: !151) -// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 9, scope: !151) -// CHECK:STDOUT: !163 = !DILocation(line: 9, column: 5, scope: !151) -// CHECK:STDOUT: !164 = !DILocation(line: 10, column: 5, scope: !151) -// CHECK:STDOUT: !168 = !DILocation(line: 11, column: 5, scope: !151) -// CHECK:STDOUT: !170 = !DILocation(line: 12, column: 8, scope: !151) -// CHECK:STDOUT: !171 = !DILocation(line: 13, column: 7, scope: !151) -// CHECK:STDOUT: !175 = !DILocation(line: 14, column: 7, scope: !151) -// CHECK:STDOUT: !176 = !DILocation(line: 15, column: 7, scope: !151) -// CHECK:STDOUT: !177 = !DILocation(line: 8, column: 3, scope: !151) -// CHECK:STDOUT: !180 = !DILocation(line: 18, column: 3, scope: !151) -// CHECK:STDOUT: !181 = !DILocation(line: 5, column: 1, scope: !151) -// CHECK:STDOUT: !182 = !{!152} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !149, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !34) -// CHECK:STDOUT: !185 = !DILocation(line: 13, column: 7, scope: !183) -// CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !149, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !34) -// CHECK:STDOUT: !189 = !DILocation(line: 13, column: 7, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !149, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !150, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !34) -// CHECK:STDOUT: !193 = !DILocation(line: 13, column: 7, scope: !191) -// CHECK:STDOUT: !194 = !{!192} +// CHECK:STDOUT: !137 = !DIFile(filename: "while_break.carbon", directory: "") +// CHECK:STDOUT: !138 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !137, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !137, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !170) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !34) +// CHECK:STDOUT: !142 = !DILocation(line: 6, column: 3, scope: !139) +// CHECK:STDOUT: !146 = !DILocation(line: 7, column: 3, scope: !139) +// CHECK:STDOUT: !147 = !DILocation(line: 8, column: 9, scope: !139) +// CHECK:STDOUT: !151 = !DILocation(line: 9, column: 5, scope: !139) +// CHECK:STDOUT: !152 = !DILocation(line: 10, column: 5, scope: !139) +// CHECK:STDOUT: !156 = !DILocation(line: 11, column: 5, scope: !139) +// CHECK:STDOUT: !158 = !DILocation(line: 12, column: 8, scope: !139) +// CHECK:STDOUT: !159 = !DILocation(line: 13, column: 7, scope: !139) +// CHECK:STDOUT: !163 = !DILocation(line: 14, column: 7, scope: !139) +// CHECK:STDOUT: !164 = !DILocation(line: 15, column: 7, scope: !139) +// CHECK:STDOUT: !165 = !DILocation(line: 8, column: 3, scope: !139) +// CHECK:STDOUT: !168 = !DILocation(line: 18, column: 3, scope: !139) +// CHECK:STDOUT: !169 = !DILocation(line: 5, column: 1, scope: !139) +// CHECK:STDOUT: !170 = !{!140} +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !137, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !174) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !34) +// CHECK:STDOUT: !173 = !DILocation(line: 13, column: 7, scope: !171) +// CHECK:STDOUT: !174 = !{!172} +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !137, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !178) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !34) +// CHECK:STDOUT: !177 = !DILocation(line: 13, column: 7, scope: !175) +// CHECK:STDOUT: !178 = !{!176} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_continue.carbon' @@ -578,63 +534,56 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !197 { +// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !200 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !210 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !217 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !200 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !200 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !204 -// CHECK:STDOUT: br label %while.cond, !dbg !205 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !184 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !194 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !201 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !184 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !184 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !188 +// CHECK:STDOUT: br label %while.cond, !dbg !189 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %if.then, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !205 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !189 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !209 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !210 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !210 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !214 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !216 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !193 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !194 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !194 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !198 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !200 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !217 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !217 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !221 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !217 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !210 -// CHECK:STDOUT: br label %while.cond, !dbg !222 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !201 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3, i64 0, i1 false), !dbg !201 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !205 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !201 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !194 +// CHECK:STDOUT: br label %while.cond, !dbg !206 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !210 -// CHECK:STDOUT: br label %while.cond, !dbg !223 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !194 +// CHECK:STDOUT: br label %while.cond, !dbg !207 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !226 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !200 -// CHECK:STDOUT: ret void, !dbg !227 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !210 +// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !184 +// CHECK:STDOUT: ret void, !dbg !211 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CUse.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !229 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !213 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !231 +// CHECK:STDOUT: ret void, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !233 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !217 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !235 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !237 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self), !dbg !239 -// CHECK:STDOUT: ret void, !dbg !239 +// CHECK:STDOUT: ret void, !dbg !219 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -652,7 +601,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!196} +// CHECK:STDOUT: !llvm.dbg.cu = !{!180} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -660,34 +609,30 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !35 = !{null, !34} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !195 = !DIFile(filename: "while_continue.carbon", directory: "") -// CHECK:STDOUT: !196 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !195, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !195, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !196, retainedNodes: !228) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !34) -// CHECK:STDOUT: !200 = !DILocation(line: 6, column: 3, scope: !197) -// CHECK:STDOUT: !204 = !DILocation(line: 7, column: 3, scope: !197) -// CHECK:STDOUT: !205 = !DILocation(line: 8, column: 9, scope: !197) -// CHECK:STDOUT: !209 = !DILocation(line: 9, column: 5, scope: !197) -// CHECK:STDOUT: !210 = !DILocation(line: 10, column: 5, scope: !197) -// CHECK:STDOUT: !214 = !DILocation(line: 11, column: 5, scope: !197) -// CHECK:STDOUT: !216 = !DILocation(line: 12, column: 8, scope: !197) -// CHECK:STDOUT: !217 = !DILocation(line: 13, column: 7, scope: !197) -// CHECK:STDOUT: !221 = !DILocation(line: 14, column: 7, scope: !197) -// CHECK:STDOUT: !222 = !DILocation(line: 15, column: 7, scope: !197) -// CHECK:STDOUT: !223 = !DILocation(line: 8, column: 3, scope: !197) -// CHECK:STDOUT: !226 = !DILocation(line: 18, column: 3, scope: !197) -// CHECK:STDOUT: !227 = !DILocation(line: 5, column: 1, scope: !197) -// CHECK:STDOUT: !228 = !{!198} -// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !195, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !196, retainedNodes: !232) -// CHECK:STDOUT: !230 = !DILocalVariable(arg: 1, scope: !229, type: !34) -// CHECK:STDOUT: !231 = !DILocation(line: 13, column: 7, scope: !229) -// CHECK:STDOUT: !232 = !{!230} -// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !195, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !196, retainedNodes: !236) -// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !34) -// CHECK:STDOUT: !235 = !DILocation(line: 13, column: 7, scope: !233) -// CHECK:STDOUT: !236 = !{!234} -// CHECK:STDOUT: !237 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !195, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !196, retainedNodes: !240) -// CHECK:STDOUT: !238 = !DILocalVariable(arg: 1, scope: !237, type: !34) -// CHECK:STDOUT: !239 = !DILocation(line: 13, column: 7, scope: !237) -// CHECK:STDOUT: !240 = !{!238} +// CHECK:STDOUT: !179 = !DIFile(filename: "while_continue.carbon", directory: "") +// CHECK:STDOUT: !180 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !179, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !179, line: 5, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !212) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !34) +// CHECK:STDOUT: !184 = !DILocation(line: 6, column: 3, scope: !181) +// CHECK:STDOUT: !188 = !DILocation(line: 7, column: 3, scope: !181) +// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 9, scope: !181) +// CHECK:STDOUT: !193 = !DILocation(line: 9, column: 5, scope: !181) +// CHECK:STDOUT: !194 = !DILocation(line: 10, column: 5, scope: !181) +// CHECK:STDOUT: !198 = !DILocation(line: 11, column: 5, scope: !181) +// CHECK:STDOUT: !200 = !DILocation(line: 12, column: 8, scope: !181) +// CHECK:STDOUT: !201 = !DILocation(line: 13, column: 7, scope: !181) +// CHECK:STDOUT: !205 = !DILocation(line: 14, column: 7, scope: !181) +// CHECK:STDOUT: !206 = !DILocation(line: 15, column: 7, scope: !181) +// CHECK:STDOUT: !207 = !DILocation(line: 8, column: 3, scope: !181) +// CHECK:STDOUT: !210 = !DILocation(line: 18, column: 3, scope: !181) +// CHECK:STDOUT: !211 = !DILocation(line: 5, column: 1, scope: !181) +// CHECK:STDOUT: !212 = !{!182} +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !179, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !216) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !34) +// CHECK:STDOUT: !215 = !DILocation(line: 13, column: 7, scope: !213) +// CHECK:STDOUT: !216 = !{!214} +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !179, line: 13, type: !36, spFlags: DISPFlagDefinition, unit: !180, retainedNodes: !220) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !34) +// CHECK:STDOUT: !219 = !DILocation(line: 13, column: 7, scope: !217) +// CHECK:STDOUT: !220 = !{!218} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/local.carbon b/toolchain/lower/testdata/var/local.carbon index 62c096488c5a..e71e85cddaa2 100644 --- a/toolchain/lower/testdata/var/local.carbon +++ b/toolchain/lower/testdata/var/local.carbon @@ -52,18 +52,11 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -90,14 +83,10 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !20) // CHECK:STDOUT: !34 = !DILocation(line: 5, column: 3, scope: !32) // CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !20) // CHECK:STDOUT: !38 = !DILocation(line: 5, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !42 = !DILocation(line: 5, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'eval_init_in_place.carbon' @@ -106,69 +95,62 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: @tuple.479.loc4_50 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !51 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !54 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !54 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !54 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.479.loc4_50, i64 12, i1 false), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !50 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !50 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !50 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.479.loc4_50, i64 12, i1 false), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !56 { +// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !59 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !59 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.479.loc4_50, i64 12, i1 false), !dbg !59 -// CHECK:STDOUT: %tuple.elem0.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !61 -// CHECK:STDOUT: %.loc8_10.1 = load i32, ptr %tuple.elem0.loc8_10.1.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: %tuple.elem0.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !61 -// CHECK:STDOUT: store i32 %.loc8_10.1, ptr %tuple.elem0.loc8_10.2.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: %tuple.elem1.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !61 -// CHECK:STDOUT: %.loc8_10.3 = load i32, ptr %tuple.elem1.loc8_10.1.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: %tuple.elem1.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !61 -// CHECK:STDOUT: store i32 %.loc8_10.3, ptr %tuple.elem1.loc8_10.2.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: %tuple.elem2.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !61 -// CHECK:STDOUT: %.loc8_10.5 = load i32, ptr %tuple.elem2.loc8_10.1.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: %tuple.elem2.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !61 -// CHECK:STDOUT: store i32 %.loc8_10.5, ptr %tuple.elem2.loc8_10.2.tuple.elem, align 4, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %a.var), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !55 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !55 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.479.loc4_50, i64 12, i1 false), !dbg !55 +// CHECK:STDOUT: %tuple.elem0.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !57 +// CHECK:STDOUT: %.loc8_10.1 = load i32, ptr %tuple.elem0.loc8_10.1.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: %tuple.elem0.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !57 +// CHECK:STDOUT: store i32 %.loc8_10.1, ptr %tuple.elem0.loc8_10.2.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: %tuple.elem1.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !57 +// CHECK:STDOUT: %.loc8_10.3 = load i32, ptr %tuple.elem1.loc8_10.1.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: %tuple.elem1.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !57 +// CHECK:STDOUT: store i32 %.loc8_10.3, ptr %tuple.elem1.loc8_10.2.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: %tuple.elem2.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !57 +// CHECK:STDOUT: %.loc8_10.5 = load i32, ptr %tuple.elem2.loc8_10.1.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: %tuple.elem2.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !57 +// CHECK:STDOUT: store i32 %.loc8_10.5, ptr %tuple.elem2.loc8_10.2.tuple.elem, align 4, !dbg !57 +// CHECK:STDOUT: call void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %a.var), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !73 +// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !73 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !77 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.555b1314256372b8:core.Destroy.Core"(ptr %self) #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core"(ptr %self), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !81 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // CHECK:STDOUT: @@ -181,7 +163,7 @@ 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.dbg.cu = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!41} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -189,38 +171,34 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !23 = !{null, !20} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !44 = !DIFile(filename: "eval_init_in_place.carbon", directory: "") -// CHECK:STDOUT: !45 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !44, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !47 = !{!46} -// CHECK:STDOUT: !48 = !DISubroutineType(types: !47) -// CHECK:STDOUT: !49 = !{null, !46} -// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !44, line: 4, type: !48, spFlags: DISPFlagDefinition, unit: !45) -// CHECK:STDOUT: !54 = !DILocation(line: 4, column: 41, scope: !51) -// CHECK:STDOUT: !55 = !DILocation(line: 4, column: 34, scope: !51) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !44, line: 6, type: !48, spFlags: DISPFlagDefinition, unit: !45) -// CHECK:STDOUT: !59 = !DILocation(line: 7, column: 3, scope: !56) -// CHECK:STDOUT: !61 = !DILocation(line: 8, column: 10, scope: !56) -// CHECK:STDOUT: !62 = !DILocation(line: 8, column: 3, scope: !56) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !44, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !66) +// CHECK:STDOUT: !40 = !DIFile(filename: "eval_init_in_place.carbon", directory: "") +// CHECK:STDOUT: !41 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !40, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !43 = !{!42} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !{null, !42} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !40, line: 4, type: !44, spFlags: DISPFlagDefinition, unit: !41) +// CHECK:STDOUT: !50 = !DILocation(line: 4, column: 41, scope: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 4, column: 34, scope: !47) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !40, line: 6, type: !44, spFlags: DISPFlagDefinition, unit: !41) +// CHECK:STDOUT: !55 = !DILocation(line: 7, column: 3, scope: !52) +// CHECK:STDOUT: !57 = !DILocation(line: 8, column: 10, scope: !52) +// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 3, scope: !52) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !40, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !62) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !20) +// CHECK:STDOUT: !61 = !DILocation(line: 7, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !{!60} +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !40, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !66) // CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !20) // CHECK:STDOUT: !65 = !DILocation(line: 7, column: 3, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !44, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !20) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !40, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !70) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !42) // CHECK:STDOUT: !69 = !DILocation(line: 7, column: 3, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !44, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !20) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !40, line: 7, type: !46, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !42) // CHECK:STDOUT: !73 = !DILocation(line: 7, column: 3, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.555b1314256372b8:core.Destroy.Core", scope: null, file: !44, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !46) -// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 3, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.555b1314256372b8:core.Destroy.Core", scope: null, file: !44, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !46) -// CHECK:STDOUT: !81 = !DILocation(line: 7, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/nested.carbon b/toolchain/lower/testdata/var/nested.carbon index bd6b336fd1f7..cea048607a82 100644 --- a/toolchain/lower/testdata/var/nested.carbon +++ b/toolchain/lower/testdata/var/nested.carbon @@ -57,18 +57,11 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -105,12 +98,8 @@ fn Run() -> i32 { // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !20) // CHECK:STDOUT: !41 = !DILocation(line: 16, column: 5, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !20) // CHECK:STDOUT: !45 = !DILocation(line: 16, column: 5, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) -// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 5, scope: !47) -// CHECK:STDOUT: !50 = !{!48} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/param.carbon b/toolchain/lower/testdata/var/param.carbon index d77ba0090f52..7578a325c52e 100644 --- a/toolchain/lower/testdata/var/param.carbon +++ b/toolchain/lower/testdata/var/param.carbon @@ -74,18 +74,11 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !24 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !24 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !28 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !30 -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -113,14 +106,10 @@ fn G() { // CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !20, type: !8) // CHECK:STDOUT: !22 = !DILocation(line: 13, column: 6, scope: !20) // CHECK:STDOUT: !23 = !{!21} -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !6, line: 13, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !27) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !6, line: 13, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !27) // CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !8) // CHECK:STDOUT: !26 = !DILocation(line: 13, column: 6, scope: !24) // CHECK:STDOUT: !27 = !{!25} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !6, line: 13, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !31) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !8) -// CHECK:STDOUT: !30 = !DILocation(line: 13, column: 6, scope: !28) -// CHECK:STDOUT: !31 = !{!29} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'struct_literal_cleanup.carbon' @@ -133,35 +122,28 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !34 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !35 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !35 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc11, i64 0, i1 false), !dbg !35 -// CHECK:STDOUT: call void @_CF.Main(ptr %c.var), !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !35 -// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !31 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc11, i64 0, i1 false), !dbg !31 +// CHECK:STDOUT: call void @_CF.Main(ptr %c.var), !dbg !32 +// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !31 +// CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !34 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !38 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !44 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -171,7 +153,7 @@ fn G() { // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!33} +// CHECK:STDOUT: !llvm.dbg.cu = !{!29} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -181,22 +163,18 @@ fn G() { // CHECK:STDOUT: !10 = !DISubroutineType(types: !9) // CHECK:STDOUT: !13 = !{null} // CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// CHECK:STDOUT: !32 = !DIFile(filename: "struct_literal_cleanup.carbon", directory: "") -// CHECK:STDOUT: !33 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !32, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !32, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 11, column: 6, scope: !34) -// CHECK:STDOUT: !36 = !DILocation(line: 14, column: 3, scope: !34) -// CHECK:STDOUT: !37 = !DILocation(line: 13, column: 1, scope: !34) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !32, line: 11, type: !10, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !41) +// CHECK:STDOUT: !28 = !DIFile(filename: "struct_literal_cleanup.carbon", directory: "") +// CHECK:STDOUT: !29 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !28, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !28, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 11, column: 6, scope: !30) +// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 3, scope: !30) +// CHECK:STDOUT: !33 = !DILocation(line: 13, column: 1, scope: !30) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !28, line: 11, type: !10, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !37) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !8) +// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 6, scope: !34) +// CHECK:STDOUT: !37 = !{!35} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !28, line: 11, type: !10, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !41) // CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !8) // CHECK:STDOUT: !40 = !DILocation(line: 11, column: 6, scope: !38) // CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 11, type: !10, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !8) -// CHECK:STDOUT: !44 = !DILocation(line: 11, column: 6, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !32, line: 11, type: !10, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !8) -// CHECK:STDOUT: !48 = !DILocation(line: 11, column: 6, scope: !46) -// CHECK:STDOUT: !49 = !{!47} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/uninitialized.carbon b/toolchain/lower/testdata/var/uninitialized.carbon index ac6f844fee3d..59390c0eb7df 100644 --- a/toolchain/lower/testdata/var/uninitialized.carbon +++ b/toolchain/lower/testdata/var/uninitialized.carbon @@ -82,37 +82,23 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core"(ptr %self), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f58524831c37807e:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core"(ptr %self), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -165,24 +151,16 @@ fn Run() { // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !9) // CHECK:STDOUT: !46 = !DILocation(line: 15, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) // CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !9) // CHECK:STDOUT: !50 = !DILocation(line: 15, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dc14d4dd21801791:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !9) -// CHECK:STDOUT: !54 = !DILocation(line: 15, column: 3, scope: !52) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !6) +// CHECK:STDOUT: !54 = !DILocation(line: 14, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6dae29ece9a708c4:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) // CHECK:STDOUT: !58 = !DILocation(line: 14, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !6) -// CHECK:STDOUT: !62 = !DILocation(line: 14, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f58524831c37807e:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) -// CHECK:STDOUT: !66 = !DILocation(line: 14, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} // CHECK:STDOUT: